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

Re: [BUG] git fetch --all --tags doesn't fetch remote branches, only tags

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 1, 2013, 01:15 UTC
Message-ID
<7vbod9d7qg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<50E2311D.8080707@gmail.com>
Dennis Heidsiek <dennis.heidsiek@gmail.com> writes:
Show 7 quoted lines
> i think there may be a bug in the fetch command: The command
>
>> $ git fetch --all --tags
>> Fetching origin
>
> doesn’t fetch new commits from origin/master, while i see via the
> web browser of my remote repository that they exist.

The "--all" option asks to fetch from all remotes, and "--tags" option asks to disable the configured fetch refspecs and instead grab only the tags. It appears that what you observed is exactly what should happen and in line with the documentation:

$ git help fetch | sed -ne '/^ .*-t.*--tags/,/^$/p'
 -t, --tags
     This is a short-hand for giving "refs/tags/:refs/tags/" refspec
     from the command line, to ask all tags to be fetched and stored
     locally. Because this acts as an explicit refspec, the default
     refspecs (configured with the remote.$name.fetch variable) are
     overridden and not used.
Previous: Dennis HeidsiekNext: Dennis Heidsiek
Message 2 of 3 in “[BUG] git fetch --all --tags doesn't fetch remote branches, only tags”
  1. Dennis HeidsiekJan 1, 2013
  2. Junio C HamanoJan 1, 2013
  3. Dennis HeidsiekJan 1, 2013

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.