Git/Overview/Deleting

From Wikibooks, open books for an open world
< Git‎ | Overview
Jump to navigation Jump to search


Removing Files[edit | edit source]

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.