git commit 的作用是簡要描述本次提交內容
如果描述沒有固定的要求,就可以使用簡單描述
git commit -m "描述"
如果對每次提交的描述有嚴格的要求,則可以調用模板來完成 commit
1、在固定路徑編輯好模板格式,例如:commit.txt
2、配置參數
設置模板路徑
git config --global commit.template ~/work/commit.txt
設置commit編輯工具
git config --global core.editor vim
設置用戶名
git config --global user.name "name"
設置用戶郵箱
git config --global user.email "Email"
3、上傳代碼
更新代碼
git add ***
git commit
git push