To do this in Git, save the above content in a file (eg ~/.gitmessage) and run:
git config --global commit.template ~/.gitmessageIf you allow empty commit messages set
git config --global commit.cleanup stripTo prevent git from using the template as the commit message.
References: