Most of the time, I commit with git commit -am
, because all I've done to the project belongs to the commit I'm working on.
Only sometimes, there are some changes I do not want to commit, so I use git add -p
to stage only what I really want. Trouble is, I'm so used to typing git commit -am
that I usually end up doing it anyway. I then get a commit with stuff I didn't want, and have to laborously go back to HEAD^
, and also re-do the add -p
.
Clearly, when some changes have already been added manually, commit -am
doesn't make sense anymore. Is there a way to prevent git from accepting the option in this case (or some alternative to -am
that is just as convenient)?