Git/Overview/Deleting

< Git‎ | Overview


Removing Files edit

To remove files, use the "rm" subcommand of git.

git rm <filename> [filenames]
git rm --cached <filename> [filenames]

The second variant only deletes the file from the cache, leaving the physical file in place.