Is there a way to edit commit comments during a git merge?

314 views
Skip to first unread message

Dave

unread,
Sep 17, 2014, 11:54:39 AM9/17/14
to gitext...@googlegroups.com
I couldn't find a place in "Merge branches" dialog for me to add/edit custom comments.

By default, the commit message I'd get is: Merge remote-tracking branch 'origin/remote-branch' into my-local-branch

Looking to do the equivalent command via the GUI:
git merge -m "custom message" origin/remote-branch

Thanks.

Simon Walker

unread,
Sep 17, 2014, 12:03:40 PM9/17/14
to gitext...@googlegroups.com, nanak...@gmail.com

Hi Dave,

I choose the "Don't Commit" option normally, proceed with the merge, then commit once it's merged where I can change the commit message as I please.

Hope this helps,

Simon

--
You received this message because you are subscribed to the Google Groups "GitExtensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitextension...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave

unread,
Sep 17, 2014, 2:22:09 PM9/17/14
to gitext...@googlegroups.com, nanak...@gmail.com
Thanks Simon. Would that create a different history, i.e. one that doesn't show a merged branch - kind of like cherry-pick then squash? I suppose it doesn't really matter since the outcome is the same unless there's an advantage of having a merge commit in the history.

* after calling "git merge origin/remote-branch"
|\
| |
| * Remote change 2
| * Remote change 1
* | Local change 2
* | Local change 1
|/
* Branch point

 - VS -

* after merge then commit (or cherry-pick and squashing rem 1 + 2)
| * Remote change 2
| * Remote change 1
* | Local change 2
* | Local change 1
|/
* Branch point


-Dave

Simon Walker

unread,
Sep 17, 2014, 5:47:07 PM9/17/14
to gitext...@googlegroups.com, nanak...@gmail.com

No, as the merge is still pending before you commit, so the new commit still has both parents referenced.

Create a new repo and test it - that's how I've learnt most things :)

Simon

--
Reply all
Reply to author
Forward
0 new messages