Member-only story
How to resolve “error: dst refspec refs/heads/main matches more than one” error when you push from local git
Although it is rare, you can get an error like this when you try to push your changes from your local directory to your repository:
error: src refspec refs/heads/main matches more than one
This can happen when there is a conflicting tag with the same name in your local environment. Or, it might look like this.
error: dst refspec refs/heads/main matches more than one
In the case above, that can happen because you have a conflicting tag in your destination environment, which is usually your repository.
What happens is that you previously createsgit tagtags, whether they are in remote or local, that have that conflicting refspecs.
Let’s first check local tags with the following commands:
git tags --list
You will see a list of tags like this.
To exist, hit keyboard button Q.
If you do see the conflict tag, you can delete local tag with a command like this.