Command
git rm
Stages removal of tracked paths and normally deletes working files. -n previews; --cached leaves the working copy. Git checks for incompatible changes. Inspect before deleting.
Formal Syntax & Structure
git syntaxgit
git rm [-n] [--cached] -- pathWorking Example
Example Snippetgit
git rm -n -- obsolete.txt