I have a bare repository, whose origin
is on a remote machine.
I would like to download its branches into the local bare repo. I.e. I want to see them with a git branch -vva
command in the branch list, like so:
* master 0bc84f0 [origin/master] something...
remotes/origin/HEAD -> origin/master
remotes/origin/master 0bc84f0 something...
In the case of non-bare repos, a git pull --all
synchronized also the branches (it made the remote branches visible in the local repository), but in the case of a bare repo, pull is impossible.
How can I sync the remote branches in this scenario?
Note: git --fetch
doesn't work, the remote branches are still invisible after it:
$ git remote -v
origin git://host/project.git (fetch)
origin git://host/project.git (push)
$ git branch -vva
* master 4085a31 ...something
$ git fetch
From git://host/project.git
* branch HEAD -> FETCH_HEAD
$ git branch -vva
* master 4085a31 ...something
Additional info: my config
is the following:
[core]
repositoryformatversion = 0
filemode = false
bare = true
symlinks = false
ignorecase = true
[remote "origin"]
url = git://host/project.git
My config
in a newly cloned (also bare) repo:
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = git://host/project.git