sometimes, git will spontaneously (during some, but not all, "pull" or "clone" operations) copy all of the remote branches of a repository into my local repository (and even set them all up to track the corresponding remote branches correctly). What causes this? Is there a way I can do this on purpose?
views:
175answers:
1
+3
A:
If you just do a normal branch from a remote branch, it'll track by default:
git checkout -b somebranch origin/somebranch
means roughly the same thing as
git checkout -t origin/somebranch
You pretty much have to explicitly tell it if you don't want such tracking.
Dustin
2009-01-06 05:14:07
ok, yeah, but sometimes I track branches that I didn't ask for!
jes5199
2009-01-06 06:12:50
Are you suggesting that it's spontaneously creating tracking branches on a plain pull? I don't know how to convince it to do that.
Dustin
2009-01-06 17:51:23
Yes, that is exactly what I am suggesting.
jes5199
2009-01-06 20:14:05
Can you reproduce this and show a script of what you did? I wouldn't know how to do that without explicitly checking things out.
Dustin
2009-01-06 21:48:17