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

3 messages from 2013-01-01 to 2013-01-01. Participants: Dennis Heidsiek, Junio C Hamano.
Thread: https://gitlist.dev/t/32491

## Dennis Heidsiek, 2013-01-01 00:43

Subject: [BUG] git fetch --all --tags doesn't fetch remote branches, only tags
Message-ID: <50E2311D.8080707@gmail.com>
URL: https://gitlist.dev/e/50E2311D.8080707%40gmail.com

```
Dear Git community,


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 same with verbose:

> $ git fetch --all --tags --verbose
> Fetching origin
> From git://repo.or.cz/wortliste
>  = [up to date]      Trennmuster-20071020 -> Trennmuster-20071020
>  = [up to date]      Trennmuster-20071223 -> Trennmuster-20071223
>  = [up to date]      Trennmuster-20080601 -> Trennmuster-20080601
>  = [up to date]      dehyph-exptl-v0.1 -> dehyph-exptl-v0.1
>  = [up to date]      dehyph-exptl-v0.11 -> dehyph-exptl-v0.11
>  = [up to date]      dehyph-exptl-v0.12 -> dehyph-exptl-v0.12
>  = [up to date]      dehyph-exptl-v0.12.1 -> dehyph-exptl-v0.12.1
>  = [up to date]      dehyph-exptl-v0.13 -> dehyph-exptl-v0.13
>  = [up to date]      dehyph-exptl-v0.20 -> dehyph-exptl-v0.20
>  = [up to date]      dehyph-exptl-v0.22 -> dehyph-exptl-v0.22
>  = [up to date]      dehyph-exptl-v0.23 -> dehyph-exptl-v0.23

Only if i omit the --tags commit, fetch does what i expect:

> $ git fetch --all --verbose
> Fetching origin
> remote: Counting objects: 13, done.
> remote: Compressing objects: 100% (8/8), done.
> remote: Total 8 (delta 5), reused 0 (delta 0)
> Unpacking objects: 100% (8/8), done.
> From git://repo.or.cz/wortliste
>    7c71430..176027b  master     -> origin/master
>  = [up to date] Keine-Haupttrennstellen-in-zweisilbigen-Wörtern -> origin/Keine-Haupttrennstellen-in-zweisilbigen-Wörtern
>  = [up to date]      python-skripts -> origin/python-skripts

I think this may be a bug; i’m using my git alias fa = fetch --all --tags --verbose quite often, and it worked in previous versions of Git.

Finnally, i’m using Git 1.8.0.3  under Ubuntu 10.04.4 LTS x86_64 via this PPA: https://launchpad.net/~git-core/+archive/ppa

Thank you for your time reading this and of cause a happy new year!


With best greetings,
Dennis Heidsiek


PS: I’m no subscriber of the Git mailing list.

```

## Junio C Hamano, 2013-01-01 01:15

Subject: Re: [BUG] git fetch --all --tags doesn't fetch remote branches, only tags
Message-ID: <7vbod9d7qg.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vbod9d7qg.fsf%40alter.siamese.dyndns.org
In-Reply-To: <50E2311D.8080707@gmail.com>

```
Dennis Heidsiek <dennis.heidsiek@gmail.com> writes:

> 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.

```

## Dennis Heidsiek, 2013-01-01 01:28

Subject: Re: [BUG] git fetch --all --tags doesn't fetch remote branches, only tags
Message-ID: <50E23BC0.30504@gmail.com>
URL: https://gitlist.dev/e/50E23BC0.30504%40gmail.com
In-Reply-To: <7vbod9d7qg.fsf@alter.siamese.dyndns.org>

```
Dear Mr. Hamano,


so i /did/ misunderstand the documentation – my fault. Thank you very much for your rapid clarification!


With grateful greetings,
Dennis Heidsiek

```
