After cloning a remote repository it does not show any remote branch by -a option. What could be the problem? How to debug it? In this snippet two of the remote branches are not shown:
$ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git
$ cd pythonwebkit
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
$ git --version
git version 1.8.3.1
Tried the same command on another machine, it works well:
$ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git
Receiving objects: 100% (186886/186886), 818.91 MiB | 3.44 MiB/s, done.
$ cd pythonwebkit/
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/debian
remotes/origin/master
remotes/origin/python_codegen
$ git --version
git version 1.7.1
Tried also cloning another repo, it works well. Though I can try it on this machine again, but it would be better to know what's wrong.
Any suggestions or hints will be more than welcome.
Edit: Answer summary: Since git version 1.8.3.2 the "--depth" and "--no-single-branch" need to be used together to get the same behavior as before. This is deemed a bug fix.
master
is your local branch.remotes/origin/master
is the corresponding remote branch. What exactly is the question? – Harappagit branch -avv
– Unletteredgit clone --depth=1 --no-single-branch
, this is what I need in most cases. – Faiyum