The default git commit message is :
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: file1
# modified: file2
#
That’s fine for me. But by default, I would prefer to have some lines uncommented :
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
modified: file1
modified: file2
#
so I don’t have to uncomment them each time.
Is it possible ?
Thanks
This information is easy to generate. Don’t include this information in the commit message because all it can do is get out of sync with the actual changes in the commit. Instead, make git generate the information you need later. For example,
git log --name-statuswill show which files were modified. You can even set analiasin your.gitconfigto make such options default. This approach should give you all of the information you need while avoiding possible pitfalls and violations of git conventions.