Apple - Git clone fails with "fatal: multiple updates for ref 'refs/tags/v1.0.0' not allowed" on MacOS Mojave
Do you have a custom .gitconfig? I had to remove the following parameter from mine in order for cloning to work again:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
git v2.21.0
was released a few days ago, so perhaps something changed under the hood. I need to go check out the release notes.
Anyways, hope this helps!
Adding a bit more background context, this line was very common to fetch the tags by default. It allowed to do git fetch
which would also do a git fetch --tags
equivalent under the hood.
Basically, if you want to fetch tags when you do a git fetch
with this v2.21 git version, you can create an alias in your .gitconfig
as follow:
[alias]
fetch = git fetch --tags
Doing this and removing the fetch = +refs/heads/*:refs/remotes/origin/*
will result in the same behaviour, but compatible with git v2.21
See https://stackoverflow.com/questions/1204190/does-git-fetch-tags-include-git-fetch/20608181#20608181 for in-depth explanation and history changes.