## 參考資料:
* [git commit官方HELP](https://www.kernel.org/pub/software/scm/git/docs/git-commit.html)
* [git commit官方API](https://git-scm.com/docs/git-commit)
## 實踐總結:
* `git commit -am` 相當于`git commit -a -m`
* `git commit -a`
* Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.
* 該指令將**修改**或**刪除**的改動放入暫存區,注意**新文件**不會放入暫存區;
* `git commit -m`
* Use the given <msg> as the commit message. If multiple -m options are given, their values are concatenated as separate paragraphs.
* 該指令將暫存區的改動放入本地倉庫(當前分支),如果使用了多個“-m”則會將該提交分成多個段落顯示;例如: 使用了`git commit -m "格式統一化" -m "多個注釋會怎樣?"` gitHub上會這樣顯示:

## git commit 常用指令:
* git commit -am "注釋內容"
* 將 **工作區** 以及 **暫存區** 代碼放入 **本地倉庫**(不包括**工作區**新建的文件)
* `git add -A`將所有 **工作區** 代碼放入 **暫存區**(包括**新建**的文件)
* git commit -m "注釋內容"
* 將 **暫存區** 代碼放入 **本地倉庫**
* git commit --amend
* 將 **暫存區** 內容再次提交到 **本地倉庫** ,該改動會添加到前一次`commit`中(不產生新的`commit`);指令執行完將進入 vi 編輯新commit注釋界面;(執行該指令前注意先執行`git add -A`)
## 相關指令:
* [git_status.md](http://www.hmoore.net/wteamxq/git_rank/276485) 查看當前代碼狀態指令: 提交代碼到**本地倉庫**后, 用我可以查看有多少個commit等待提交到遠程哦!
* [git_push.md](http://www.hmoore.net/wteamxq/git_rank/276489) 提交代碼至遠程倉庫指令: `git commit`后, 接下來就是我`git push`出場了!