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)