In my git (v 1.7.10.2), I have to do the following in my terminal:
GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT
So, everytime I merge, I am not force to put a message.
Where should I put this, so by default it gets this set up and I don't have to type it everytime I open the terminal in my MAC?
In the event that you require a merge commit during a fast forward merge for record keeping purposes you can execute git merge with the --no-ff option. git merge --no-ff <branch> This command merges the specified branch into the current branch, but always generates a merge commit (even if it was a fast-forward merge).
Fast-forward merges literally move your main branch's tip forward to the end of your feature branch. This keeps all commits created in your feature branch sequential while integrating it neatly back into your main branch.
The git merge command facilitates you to take the data created by git branch and integrate them into a single branch. Git merge will associate a series of commits into one unified history. Generally, git merge is used to combine two branches.
Unlike other commits, the merge commit is a commit which has multiple (generally two) parents. For instance, when a branch named feature is merged with master, a new commit is created on the branch master which has two parents, the previous head of master and the head of feature.
You can put it in:
.bash_profile
Open a terminal
nano $HOME/.bash_profile
and add the line
export GIT_MERGE_AUTOEDIT=no
Don't forget to open a new terminal for this to work.
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