Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Force fetch tags on checkout local working clone #2184
In Git 2.20 "git fetch" was taught to forbid updates to existing tags
To prevent this from happening: force fetch all tags from the mirror
NB: We only have to do this while creating a working clone from a
This is already the case if I am reading the man page correctly.
In Git 2.20 "git fetch" was taught to forbid updates to existing tags without the "--force" option. As Flux force-pushes a tag all the time to keep track of the sync state, this would sometimes lead to 'would clobber existing tag' errors while making sure a fresh checkout was up-to-date with its mirror, as described issue 2169. To prevent this from happening: force fetch all tags from the mirror while creating the local working clone, and _before_ fetching anything else. NB: We only have to do this while creating a working clone from a mirror, as a mirror (bare clone) will accept non-fast-forward tag changes from remote. : https://github.com/git/git/blob/master/Documentation/RelNotes/2.20.0.txt#L67-L71 : #2169