Git stuck branch

I had a problem pushing my branch to a remote repository. Git returns me an error message: error: dst refspec refs/heads/XXX matches more than one.When I start git ls-remote, it shows only one branch XXX, though! (I tried deleting the branch using git push origin :refs/heads/XXX, as well as with the same result)

We encountered this problem several times in several Git repositories. Earlier we did the cloning of the repositories, and the “stuck” branch disappeared from the cloned repositories.

I am wondering if there are alternative solutions to solve this problem without resorting to re-cloning the repository. Git version 1.7.XX.

Thank!

+4
source share
1

, , , .
, :

git push origin :refs/tags/XXX 

, , (refspec )

git push origin refs/heads/XXX:refs/heads/XXX
+4

Source: https://habr.com/ru/post/1535928/


All Articles