I somehow ended up with a git configuration with the following in the [remote] section:
fetch = +refs/heads/master:refs/remotes/origin/master
This of course means that I would never ever see branches that my collaborators have added. I realize that I need to change this to:
fetch = +refs/heads/*:refs/remotes/origin/*
but I am confused as to why my configuration ended up this way in the first place, and more importantly, how I can avoid it ever happening again. Any idea how to set up a repo so that it does not do this?
Thanks, cf
It sounds like you used git remote add -t master origin url/to/origin/.git
. The -t master
switch overrides the fetch
refspec to only fetch that one branch. If you skip the -t master
then you'll get the expected glob refspec.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With