Git commit without staging

Viewed 17592

I noticed that git allows to commit a tracked file (which was modified locally) directly without using staging, eg:

$ git status -s .
 M   myfile.txt
$ git commit myfile.txt -m"1 way"

Is it better to use, instead, the "classic" two steps ? :

$ git add myfile.txt
$ git commit myfile.txt -m"2 way"
2 Answers
Related