>[info] git commit -m 'xixi'
功能:將暫存區的所有內容提交到當前分支。-m 參數后面的字符串表示本次的提交說明。
每次提交就保存一份文件快照了,提交之后本次提交以后就不能再更改了?這也是以后能回到任意提交的依據?
### 重要參數:
可以使用 `--allow-empty` 選項強制創建一個沒有任何改動的提交:
~~~
$ git commit -m "Big-ass commit" --allow-empty
~~~
這樣做在如下幾種情況下是有意義的:
- 標記一批工作或一個新功能的開始。
- 記錄你對項目進行了跟代碼無關的改動。
- 跟使用你倉庫的其他人交流。
- 作為倉庫的第一次提交,因為第一次提交日后是不能被rebase的: git commit -m "init repo" --allow-empty .
[重新設置提交信息](http://www.hmoore.net/kancloud/how-to-use-github/42206)
~~~
git commit --amend --reset-author -C HEAD
~~~
[跟缺陷跟蹤相關聯](http://www.hmoore.net/kancloud/how-to-use-github/42210)
~~~
git commit -m "Fixed #3: should be 項目, not 項."
~~~
[修正先前的提交](http://www.hmoore.net/kancloud/igit/46715)
~~~
git commit --amend -m "Add an author/email comment"
~~~
- 說明
- git配置
- git與github的關系
- 基礎概念
- git命令
- git init
- git status
- git diff
- git log
- git reflog
- git add
- git commit
- git reset
- git checkout
- git rm
- git stash
- git remote
- git push
- git clone
- git branch
- git fetch
- git merge
- git rebase
- git pull
- git tag
- 建立版本庫
- 分支合并
- 遠程庫別名
- Pull requests
- 擴展知識
- 功能文件
- 差異看法
- 注意細節
- github移動端
- git工作系統理解
- 倉庫嵌套問題
- 倉庫的使用問題
- 常用命令
- 學習資料
- 學習總結
- 示例文件
- README.md
- CONTRIBUTING.md
- .gitignore
- coding
- 大小寫問題
- 如何貢獻
- 使用賬號密碼clone
- git目錄分析
- HEAD
- 代碼部署問題
- 開發流程
- 指定公鑰文件