If you're using Git from the command line, is there a way to delete in one fell swoop all the files to be deleted in the Changed but not updated list? Rather than doing manual removes using wildcards.
Files shown as deleted in the "Changed but not updated" section of status are deleted from the work tree but not from the index. To stage the deletion in the index (i.e. remove the file from the index) you can do:
git diff -z --name-only --diff-filter=D | git update-index --remove -z --stdin
--diff-filter=D
shows only the differences to the index that are deleted files, --name-only
just prints their name and -z
uses NUL to separate file names so that you don't have to worry about filenames with embedded newlines. update-index
then removes the given files from the index.
If you have a version of xargs
that supports -0
then you could do the slightly simpler:
git diff -z --name-only --diff-filter=D | xargs -0 git rm