2017-09-04 213 views
-5

有人可以說明git commit -am和一些使用git commit -m之間的區別,但兩者都有效,但我不知道有什麼區別。git commit -am和git之間有什麼區別-m

+1

的組合不能你讀[搞笑手冊(https://git-scm.com/docs/git-commit)? – 2017-09-04 10:56:31

+0

'-a':「*告訴命令自動對已被修改和刪除的文件進行分段,但是沒有告知Git的新文件不受影響。*」 – Maroun

+1

可能的重複[爲什麼我必須使用git提交-a「而不僅僅是」git commit「?](https://stackoverflow.com/questions/14459927/why-do-i-have-to-use-git-commit-a-rather-than-just- git-commit) – 2017-09-04 10:59:16

回答

0

Git commit -am在提交前添加所有文件的階段。

1
git commit -am 

// add all files staged for the commit 
git commit -a 

// commit with the message 
git commit -m "" 
相關問題