开发者

Git svn commit with id

I am working开发者_JAVA技巧 to setup a local git that bases it's repository on a SVN store.

All looks ok but how do I link a work item id with a comment to svn store when I run "git svn dcommit"?


For every svn commit git svn dcommit takes the commit message from the corresponding git commit. So you write your ticket id in the commit message like you did in subversion before you transfer it into svn.

When you already made your commits without these IDs, you can use git rebase -i HEAD~10 to edit the message of a commit, before you push it into svn.


You can also run git svn dcommit -e and add the tags interactively to each commit during the dcommit process. Our svn hooks require the bug ID in the first line of the commit message, and since that messes with git log --oneline output, I like to wait until I dcommit to add it.


Took a while to remember I asked this question. The solution was pretty simple. I just has to format the git commit message so the post commit hook was able to read the commit and dispatch it wherever. We are using mantgis and buildmaster user Issue : : XXXXX format where XXXXX is a number. So your commit message simply looks like "my commit message Issue : : XXXXX". You can even add "Reviewed By : : K. Colleague" before "Issue" token. Remember to check your buildmaster what format he uses for the hooks. It varies...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜