I'm trying to do some automation scripts using git, simple things like updating submodules, moving to proper tags etc, but one of the problems I'm now finding is that git now forces you to confirm a merge message. Is there any way to squelch this behavior from happening?
press "esc" (escape) write ":wq" (write & quit)
OPTIONS. Perform the merge and commit the result. This option can be used to override --no-commit. With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing.
If the commit only exists in your local repository and has not been pushed to GitHub.com, you can amend the commit message with the git commit --amend command. On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter.
You can add the --no-edit
switch to git-merge
and it will not ask you to confirm the merge message.
To prevent git from promting you for an commit message on mac add this to your .bashrc or .bash_profile (read more about the difference between the two files)
export GIT_MERGE_AUTOEDIT=no
Then in your terminal type:
source ~/.bashrc
to reload your bash-file and continue without any interference.
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