When I run git status
, I have a bunch of lines of the form
deleted: dir/file.js
I can remove each of these individually with git checkout -- dir/file.js
, but there must be a less painstaking way to do so. (And yes, I know I should've used git rm
in the first place...)
[Update: As Mark points out below, git checkout --
actually restores a deleted file, whereas I'd thought that it deleted it from the git index. I was a little baffled, because when you run git status
, it says:
use "git checkout -- <file>..." to discard changes in working directory
To me, "discard changes" doesn't mean "restore a file you deleted," but in git terminology I suppose this makes sense.]