git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?
Previous: Peter ShenkinNext: Peter Shenkin
Message 26 of 32 in “Clarify that '--tags' fetches tags only”
  1. Clarify that '--tags' fetches tags onlyAnatol Pomozov, Sep 2, 2011
  2. Drew NorthupSep 2, 2011
  3. Clarify that '--tags' fetches tags onlyAnatol Pomozov, Sep 21, 2011
  4. Michael WittenSep 22, 2011
  5. Junio C HamanoSep 22, 2011
  6. Michael WittenSep 22, 2011
  7. Michael WittenSep 22, 2011
  8. Andrew ArdillSep 22, 2011
  9. Michael WittenSep 22, 2011
  10. Docs: Clarify the --tags option of `git fetch'Michael Witten, Sep 22, 2011
  11. Michael WittenSep 22, 2011
  12. Junio C HamanoSep 22, 2011
  13. Docs: Clarify the --tags option of `git fetch'Michael Witten, Sep 22, 2011
  14. Junio C HamanoSep 22, 2011
  15. Michael WittenSep 22, 2011
  16. Michael WittenSep 22, 2011
  17. Junio C HamanoSep 22, 2011
  18. Docs: Clarify the --tags option of `git fetch'Michael Witten, Sep 22, 2011
  19. Daniel JohnsonSep 22, 2011
  20. Peter ShenkinSep 30, 2011
  21. Jakub NarebskiSep 30, 2011
  22. Michael WittenSep 30, 2011
  23. Peter ShenkinOct 1, 2011
  24. Michael WittenOct 1, 2011
  25. Peter ShenkinOct 1, 2011
  26. Michael WittenOct 1, 2011
  27. Peter ShenkinOct 1, 2011
  28. Michael WittenOct 1, 2011
  29. Peter ShenkinOct 1, 2011
  30. Peter ShenkinOct 1, 2011
  31. Junio C HamanoSep 30, 2011
  32. Peter ShenkinOct 1, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.