|
Re: JGit - How to specify commit message for merge commit? [message #1118139 is a reply to message #1117159] |
Fri, 27 September 2013 05:22 |
Christian Halstrick Messages: 274 Registered: July 2009 |
Senior Member |
|
|
Just tell the mergecommand not to commit and only to prepare the merge. Then call commitCommand to specify your commit message. See here:
Git git = Git.init().setDirectory(...).call();
RevCommit initialCommit = git.commit().setMessage("initial empty commit").call();
RevCommit commitOnMaster = git.commit().setMessage("next empty commit").call();
git.checkout().setCreateBranch(true).setName("side").setStartPoint(initialCommit).call();
git.commit().setMessage("next empty commit on side").call();
git.merge().include(commitOnMaster).setCommit(false).call();
git.commit().setMessage("my special merge commit message").call();
Ciao
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.03652 seconds