I am trying to convert a svn repo to a git repo. I therefore followed the second (most upvoted) answer of a previous SO question. I only diverged by converting svn tags to git tags and created annotated, not lightweight tags, like so:
git checkout -b tag_v1 remotes/tags/v1
git checkout master
git tag -a v1 tag_v1 -m "release"
git branch -D tag_v1
After I converted the repo, I tried to describe the git tags, as follows:
git describe
However, I only receive the following error message in return:
fatal: No tags can describe <SHA>
In addition, when I try to look at the ancestry-path from a commit related to a tag to the current HEAD as,
git rev-list --ancestry-path <SHA RELATED TO TAG>..<SHA RELATED TO HEAD>
I receive an empty response. In accordance to the accepted answer from this SO question, I made sure to fetch all remote branches. In response to the second (most upvoted answer) I also made sure that each tag is associated with a commit message. Git show
for a particular tag reveals:
tag A
Tagger: foo
Date: bar
release
commit d1c276a83a4e21dc26e019905db9a237e1366013 (tag: A)
Author: baz
Date: bazbaz
Created a tag for version 2.8.0
Does somebody know why git describe
always return the error message? I am grateful for any hints or suggestions!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…