ERROR:SRC Refspec XXX matches more than one

Source: Internet
Author: User
When you manage your code with repo, you encounter error:src Refspec XXX matches more than one error, which is encountered when deleting a remote tag.
One is encountered when a tag is push to the server, and the two error hints are exactly the same. How to solve this problem, after the study found
To solve the method, the following will solve the method and share with you.
In the first case, the workaround for removing the remote branch is when you encounter this situation:

For example, delete the Testtag on the server when the tag, enter the following command [HTML] view plain copy git push origin:testtag prompt error:src Refspec XXX match ES more than one
Error:failed to push some refs to ' git@xxx:android/text.git '
The reason for this error is that there is a tag branch on the server which is the name of the Testtag, which has a branch branch.
That is, the tag branch and the branch branch have the same name, when executing the git push origin:testtag This command is not known to delete the

Therefore, the error is indicated. Workaround:

[HTML] view plain copy git push Origin:refs/tags/testtag

This is the branch that explicitly tells the server to delete the tag,
Delete Branch Branch
[HTML] view plain copy git push origin:refs/heads/testtag The second case, the solution to push a tag branch to the server is when you encounter this situation:
Also the Testtag this tag branch, for example, push the tag branch to the server
[HTML] view plain copy GIT push origin testtag hint: error:src refspec XXX matches more than one
Error:failed to push some refs to ' git@xxx:android/text.git '
This error occurs mainly because there is also a branch branch named Testtag, which is not known to push the branch branch to
The server or the branch of the tag push to the server, if it is to push the tag branch to the server, then the branch branch is deleted, if the
Branch's branch push to the server will delete the tag's branch.
To delete a branch branch:
[HTML] view plain copy git branch-d testtag

Ways to delete the tag branch:

[HTML] view plain copy git tag-d testtag

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.