Git/egit tool Use--Funny reference name (funny refname)

Source: Internet
Author: User

An important reason to be lazy to switch items from SVN to git is not to use Git. Recently I felt that we had to study, then encountered a variety of problems, but also read a lot of articles.

This article speaks about the failure of the push tag--the funny reference name. The error message is as follows:

Repository [email protected]:wei.chou/gitusagetest.gitfunny refnameerror:refusing To create funny ref ' v2.1 ' remotely

The operation was rejected. The reason is that "v2.1" cannot be used as a reference name .

Why?

See this passage on the StackOverflow:

@ScubaSteve The Pro Git book can is useful here. It describes how refs work, and the Git User's manualtalks about them too. Basically, all refs does is point at a commit. Branches is under refs/heads , tags are under refs/tags , and remotes go under refs/remotes . So refs/heads/workingBranch refers to a branch.–Jszakmeister Dec One ' at 9:46????

Presumably, branches's reference name must be in the refs/heads/... Under the path, the reference name of tags must follow the refs/tags/... Path, the reference name of the remotes must follow the refs/remotes/... The path. Why? No why. Hard rules can be seen from the source code of GIT:


Ok! So easy, the problem is solved.

For kids who don't know the GIT structure, see git book Chinese, git object model, and GIT tracking branch.


Git/egit tool Use--Funny reference name (funny refname)

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.