top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to change default git commit message?

+1 vote

I have added some changes on commit message in prepare-commit-msg file and then I exec this command

git config --global commit.template .git/hooks/prepare-commit-msg  

After that when I do git commit I receive something like this

40 lines of my changes and then  

# Please enter the commit message for your changes. Lines starting # with # will be ignored, 
  and an empty message aborts the commit. # Explicit paths specified without -i nor -o; 
  assuming --only paths... # On branch master # Changes to be committed: # # modified: test #  

Question is there any chance to show this default message on the top? Or better permanently remove this message?

posted Jan 18, 2016 by Luv Kumar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
May be you need to set the "commit.status" variable to false?

Similar Questions
+1 vote

I did a series of commits and now I find one of my commit (not the topmost one) has an incorrect commit message. How can I change that specific one? I believe "git commit --amend" works only for the last commit.

+2 votes

Could somebody tell me how to make git rebase -i show diff of squashed commits (for example), like git commit -v does it?

+2 votes

In the past, when we do the merge in git, if conflicts occurred, when we commit, the conflict list will be appended to the default commit message automatically.


Today, after using Git 2.3.0 for a merge, it seems now the conflict list was commented out by default.

I just searched a bit in the release notes, don't know whether below item has to do with this change.

"git interpret-trailers" learned to properly handle the "Conflicts:"
block at the end.

We quite rely on the default generated conflict list to reminder us about the "history".

Is this the default behavior now (conflict list commented out)?