I working in a project where each commit in a branch MUST start with
Story PRJCT-NAME-42 Task description
And must contain a message like this
Story PRJCT-NAME-42 Task description
foo bar description
I've created a custom message and stored in ~./gitmessage
. The content of the file is
Story PRJCT-NAME-42 Task description
It is possible t run git commit
and have focus in line number three?
Add this line to your
~/.vimrc
:This will move the cursor to line #3 whenever a file called
COMMIT_EDITMSG
is opened (which is the name of the temporary file used by git while editing a commit message)