By habit, I'll often work on a change in my repo, and add/commit it in one shot using git commit -am 'my commit message'
There are times when I only want to add a few of the modified files, so I'll issue preparatory git add
commands to meticulously set-up my staging area, and separate the ready-to-commit changes from the half-baked changes.
Then, I'll fat-finger the whole thing by issuing the same git commit -am '...'
command as I usually do.
Would there be a way for me to disable the git commit -a
option, and/or issue a warning when I use the -a
switch? I want to train myself out of this sketchy habit...