git commit -m and git commit -am difference

git commit -m 和 git commit -am

Usually modify a file and submit the file to the local branch of the command is:

git add .
git commit -m 'update'

In fact, two or more commands can be combined using a (simplified):

git commit -am 'update'

[Is] two commands add modify merge [am]

If the project added a new file, you must use a separate command, the command can not merge

git add .
git commit -m 'update'

Guess you like

Origin www.cnblogs.com/chenxi188/p/11903945.html