Last Updated: February 25, 2016
·
462
· dfadler

Remove Files From Git Repository Index

To remove file(s) from only the Git index and not the working tree simply pass the argument --cached before the file(s).

git rm –cached your-file.php
git rm -rf –cached ./your-directory

http://polytechnicstl.com/2013/01/remove-files-from-git-repository-index/