vi ~/.gitmessage.txt
Add your desired template, e.g.:
# Title: Short summary (50 chars max)
# Description: Detailed explanation (wrap at 72 chars)
# Issue: Link or ID
Save and exit~
git config --global commit.template ~/.gitmessage.txt
git config --global --get commit.template
It should return:
/home/yourusername/.gitmessage.txt