Mohsen Mirhoseini Argi Mohsen Mirhoseini Argi - 5 months ago 148
Git Question

What is .stCommitMsg in git global configuration file?

I found this in my git global configuration file


template = {my user root folder}/.stCommitMsg

I have no idea what is the usage, and also there was no file in this name in my user root folder!

Does any one knows how it works? and is it possible to have a template for git commits?!


You never showed us the actual contents of .stCommitMsg, but it is presumably just a Git commit template file. If you specify this file as a commit template in your global .gitconfig then every time you make a commit you should be prompted with the contents of .stCommitMsg, asking for a commit message.

Ideally, the template would provide a structure for you to follow while making a commit message. Commented lines beginning with # can help to give hints. For example, the template might look like this:

# enter JIRA issue tracking number

# enter brief description of what was done