I am trying to learn branching and merging in git. I thought that merging 2 branches automatically generates a merge commit and message (which I regard as a good thing). I DO want a commit and a commit message automatically generated, preferably with the ability to edit the commit message.
I made a "test" branch, deleted two non-critical files, commited, and then merged test back into master. I do not get a commit or a commit message for the merge; instead HEAD (on master) becomes the last commit from the test branch.
Am I doing something wrong? Is there a way of forcing it to automatically generate a commit with each merge, preferably allowing me to edit the commit message?
Thanks.
You can use git merge --no-ff to avoid performing a fast-forward merge and thus always creating a merge commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With