I am using Git version 1.9.1 and recently received this notice when making a commit on my repository:
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed.
I usually commit changes by using these two commands:
git add .
git commit -a
I am now wondering whether I should switch to using --ignore-removal or -A. I read some of the other StackOverflow answers about this warning message, but I'm still not entirely clear on whether there would be any difference which option I use given that I'm immediately following it with git commit -a, which stages files for removal anyway.
My goal is to just have git automatically recognize all changes to a directory - additions, modifications, and deletions, and in fact I have an alias set up to do this in one command. I am currently leaning toward changing my alias to this:
git add -A .; git commit -a
Would that achieve my goal? My tentative understanding is that --ignore-removal would only be relevant in the case where I deleted some files but am not ready to commit those deletions to git yet - is that correct?
Thinking about this a bit more, I'm realizing I may not need the -a option on the commit command if I'm using -A on the add command, so how about this?
git add -A .; git commit