Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 "commit message" or, alternatively, just git commit -am "commit message"?

question from:https://stackoverflow.com/questions/3629545/is-git-commit-am-redundant-if-i-do-git-add-before

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
237 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...