Do "git status -a" to figure out the removed ones.
I actually think we should probably make "git add ." do it too, but it's
not how we've done it historically ("git add ." really ends up just
reading the working directory tree and addign all the files it sees: so by
definition it doesn't do anything at all to files it does *not* see, ie
the removed ones).
Well, it's just "behaviour". It's probably largely historical, in that
"git add" used to be thought of as "adding new files", but obviously then
it got extended to mean "stage old files for commit" too, but in that
extension, the "remove old files" never came up.
But git certainly has the capability. "git commit -a" will notice all the
files that went away and automatically remove them, so
git add .
git commit -a
will do what you want (except, as we found out last week, we've had a huge
performance regression, so that's actually a really slow way to do it, and
so it's actually faster to do
git ls-files -o | git update-index --add --stdin
git commit -a
instead (where the first one just adds the *new* files, and then obviously
the "git commit -a" does the right thing for old files, whether deleted or
modified)
Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html