Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When converting from SVN to Git, how do I put the revision number in the commit message?

Tags:

git

clone

git-svn

We will be converting our repository from Subversion to Git, but would like to be able to retain the SVN revision number as comments in the bug tracker regularly reference it.

We will be using git svn clone and the process described in John Albin's blog.

Is there a way to include the revision number in the commit message? I'd prefer to do it during the clone, but a post-processing step would be acceptable.

Yes, I know about git svn find-rev, but that requires the SVN repository stick around and the user has network access to it.

like image 677
John Franklin Avatar asked Feb 23 '23 05:02

John Franklin


1 Answers

git svn does this by default: it normally includes a line in every commit message that has the SVN revision number (and some other data) for that commit.

However, the link you posted has you cloning with --no-metadata, which tells git svn not to append the git-svn-id line.

like image 148
John Flatness Avatar answered Feb 26 '23 07:02

John Flatness