$ git rmrm 'filename' $ git status # On branch master # # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted:filename#filename
git rm filename will remove the entire file. It is only when a file has uncommitted changes that git rm filename will give a diagnostic and not remove it. To remove a file despite the uncommitted changes, use the --force or -f option.
--cached option, then commit the removal.
$ git rm --cachedfilename$ git commit -m'remove file message'