There are two hooks that may interest you: prepare-commit-msg and commit-msg
prepare-commit-msg is probably better suited for your purposes, as it allows you to pre-populate a commit message before the user sees it. Unfortunately, Smartgit does not support this hook. (see My post and two older posts to which he refers)
commit-msg will also allow you to change the commit message, but does it after the user has sent the messages. The hook script examples in the .git / hooks directory should give you a good start when writing your own.
Git hooks are more versatile than templates. Templates are easier to use. If your preloaded commit message does not have anything dynamic, or for which you need a shell script, a template might be a more suitable route. To use a template, you must set the commit.template option in git-config . To install this in Smartgit, go to "Tools"> "Open git shell", then type
Git config commit.template tmplfile
where tmplfile is the file that contains your commit message template, including the path from your git project root.
lightinthedark
source share