IIRC, this means that you somehow finished creating another ref that has the name master, but does not live in the usual place. Several times I saw this because I was busy with the plumber team and did not provide the full path to ref ( refs/heads/master ) when the team was waiting. First, let your local repository be updated using the remote with:
git fetch --all
First check the local repository:
git show-ref | grep -i master
-i is there because you are on Windows, and case sensitivity can be a problem. I suspect you might see something like refs/master in the list. The idea is that there is a name that can be solved in two ways. refs/remotes/origin/master and refs/remotes/tmp/master are fine, as they are correctly replaced with names.
If all else fails, check the remote:
git ls-remote url://to/remote/repo.git | grep master
I suspect the problem is in your local repository. For a local repository, you can remove ref via update-ref :
git update-ref -m 'remove duplicate ref' -d <duplicate ref>
Where <duplicate ref> is optional, found in the show-ref command. Branches are stored in refs/heads . Be careful not to delete refs/heads/master .
If on the remote control you must delete the duplicate using:
git push origin :<duplicate ref>
Where <duplicate ref> is optional, found by the ls-remote above. Again, be careful. Do not use master or refs/heads/master .
If possible, update your question with the output of git show-ref and git ls-remote . In addition, I can skip you in the comments to make sure that you do not lose any data.
Now when we see that packaged refs is the culprit
So the problem is that packed-refs has more than one line referring to master. I'm not quite sure how this will turn out, but I suspect there is a version of git that allowed it to slip through. A git gc will overwrite packed-refs , so I'll just do it on your tmp remote.