vim, git, aws and other three-letter words

Software Development Notes

git: remove deleted files from git

We can use git rm file-name for one file, but we can also tell git to remove all missing files.

To remove files that were already deleted on the file system but are still tracked by git, run git add with the -u flag:

git status
# D abc.c

git add -u

This tells git to automatically stage tracked files, including the deletion of the previously tracked files.

Stack Overflow: How do I commit all deleted files in Git?

Tags: git