What does the flag '-a' mean in the command git commit -a -m 'message' ?

The title of the commit can also be given by just using '-m' flag. Then what is the use of using '-a' ?


Better not use -a, as you might accidentally stage files you did not want to stage.

From git help commit:

-a, --all
Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .