If you added a file by mistake, you can unstage it (but keep local changes) by saying
git reset HEAD path/to/file
This is also what git status
will tell you.
NB: It works for conflicts, too, if git checkout -- <file>
does not (although git tells you it would).
Posted by Henning Koch to makandra dev (2010-09-07 17:47)