Svn2git:将修订号添加到git commit title [英] Svn2git: Add revision number to git commit title
问题描述
我想将svn修订版添加到每个git commit标题中,所以我可以在Team Foundation Server的历史记录的每次提交中看到每个修订版。
我已经尝试用--amend编辑一个提交,但是这样它只是做了一个新的提交(并且历史记录变得不正确)。我也不想编辑每一个提交。
屏幕截图显示我想要做什么
屏幕截图显示了我用--mmend。
我使用svn2git进行迁移。
svn2git
的pleny工具。如果您未使用 https://github.com/svn-all-快速导出/ svn2git 。我强烈建议使用 svn2git
工具。这是我所知道的最好的,并且它对你的规则文件的操作非常灵活。 你可以很容易地将它配置为你的布局获得你想要的结果。
如果你不是100%关于你的存储库的历史, svneverever
来自 http://blog.hartwork.org/?p=763 是一款非常棒的工具调查SVN存储库在将其迁移到Git时的历史。
使用最新的合并拉取请求,您甚至可以用它完成您的请求。只需获取并编译源代码或等到新版本完成。然后,您可以将 - add-metadata
开关与应用的 - msg-filter
开关结合使用在 - add-metadata
之后,因此在 - msg-filter
过程中,您可以将自动添加的元数据与修订号并将其移动或复制到提交消息的第一行的末尾。
I want to add the svn revision to every git commit title, so can I can see every Revision in each commit in the history of our Team Foundation Server.
I already tried editing a commit with "--amend", but this way it just makes a new commit (and the history becomes incorrect). Also I dont wanna edit every commit one by one. Screenshot of what I wanna archieve The Screenshot shows what I did with --ammend.
I'm using svn2git for the Migration.
There are pleny tools called svn2git
. If you are not using the KDE one from https://github.com/svn-all-fast-export/svn2git. I strongly recommend using that svn2git
tool. It is the best I know available out there and it's very flexible in what you can do with its rules files.
You will easily be able to configure it for your layout to get the result you want and expect.
If you are not 100% about the history of your repository, svneverever
from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of a SVN repository when migrating it to Git.
With the latest merged pull requests you can even fulfill your request with it. Just get and compile the sources or wait until a new release is done. Then you can use the --add-metadata
switch in combination with the --msg-filter
switch which is applied after --add-metadata
, so in the --msg-filter
process you can take the automatically added metadata with the revision number and move or copy it to the end of the first line of the commit message.
这篇关于Svn2git:将修订号添加到git commit title的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!