I have two directories on my local machine pointing to the same remote git repository.
When I issue the command git branch -r
in one of the directories I get a longer list of remote branches then in the other directory. How is that possible ?
It seems that some of the remote branches are 'hidden' in one directory and are visible in the other.
views:
29answers:
2
A:
Are both repositories up-to-date? Try running git fetch
and see if that fixes it.
mkarasek
2010-08-22 09:10:50
+1
A:
I think you should fetch and prune:
prune
Deletes all stale tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in "remotes/<name>".
With --dry-run option, report what branches will be pruned, but do not actually prune them.
With this commandlines:
git fetch
git remote prune origin
Andreas Rehm
2010-08-22 09:42:07
These two commands can be shortened to `git fetch -p`.
svick
2010-08-22 11:13:29