I am using
git fetch origin feature/blabla
to be really specific what I want to fetch.
- However this does not fetch tags which are currently on
feature/blabla. - A
git fetchonly (supposed the branch is checkedout) fetches the tags too.
Is it possible to use my version and also fetch the tags
along? (I dont want to fetch all tags with git fetch --tags).
Especially this is usefull when on another branch.
Check first if adding --tags does import all tags.
As seen in git/git commit 5328456, the
git fetchman page used to say:So if you fetch only one branch, only the tags referring that branch should be fetched.
The OP Gabriel reports in the comments that:
Although it does not work, since
--allstill fetches all tags.So the behavior must have change,d and tags are no longer auto-followed.
Git would have to consider each tag, in order to check if it contains (reference a commit of) the branch you want to fetch.
That would delay considerably the fetch operation itself.
So for now,
--tags(meaningrefs/tags/*) is the only option.Or a convoluted script which would: