Is git commit -am redundant, if I do git add before?

前端 未结 5 941
忘了有多久
忘了有多久 2021-01-30 13:41

Is it redundant to run git add . and then git commit -am \"commit message\"?

Can I just run git add . and then git commit -m

5条回答
  •  失恋的感觉
    2021-01-30 14:06

    Git add + git commit -m will just commit those files you've added (new and previously tracked), but git commit -am will commit all changes on tracked files, but it doesn't add new files.

提交回复
热议问题