简体   繁体   中英

Git svn commit with id

I am working 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"?

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.

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.

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM