Re: [PATCH] Clarify that '--tags' fetches tags only
- From
Michael Witten <mfwitten@gmail.com>
- Date
- Oct 1, 2011, 18:45 UTC
- Message-ID
- <CAMOZ1Bsc2idQnKxeggruPi1rrY3+vsa=DoMydHY4+BM+qoW69w@mail.gmail.com>
- In-Reply-To
- <loom.20111001T191413-25@post.gmane.org>
On Sat, Oct 1, 2011 at 17:16, Peter Shenkin <shenkin@gmail.com> wrote:
Show 11 quoted lines
> Michael Witten <mfwitten <at> gmail.com> writes: >> However, my point was this: >> >> You can still tell git to fetch anything else you want in addition. > > Michael, > > Yes, you are right. I am still missing how to do that. > > Can you show me a sample fetch invocation that would > have the effect of downloading all tags and also branch heads?
Unfortunately, there's currently no way to tell "git fetch" to download whatever your configuration files specify as default, but you can at least be explicit by using what's called a "refspec" (which is documented in "git help fetch"):
git fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'
You could probably get your hands on the default refspec by rigging something up with "git symbolic-ref" and "git config", but that's so much hassle; currently, it is probably best just to run "git fetch" twice.
Sincerely, Michael Witten
You might also find this email insightful:
http://article.gmane.org/gmane.comp.version-control.git/181911
Message-ID: <7142366f54c44cea82542adf8aea5bb9-mfwitten@gmail.com>
Subject: Re: any way to "re-sync" a bare repository against
another bare repository?