Closed pllim closed 5 years ago
👍
-a
only auto stages already tracked files. If tracked files are changed, why do said changes not want to be committed?
"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."
Using git add <file>
, in this context, passes repsonsibility to the user rather than letting git manage this for you, e.g. what happens when you forget to explcitly add a file to stagging?
FYI - I use git commit -a
all of the time, as my default workflow. The only time I use git add
is to:
1) track new files 2) stage changes that I do not want to be explcitly responsible for commiting, e.g. resolving merge/rebase conflicts.
I have seen many people bitten by the
-am
option. I am suggesting something easier to undo.p.s. Not sure why my Emacs generated diff in L3. Maybe it is fixing some pesky endline character added by Mac.