>

There are sometimes that we want to untrack a file but don’t want to delete, in another word, we want to keep it in local file system but delete it from the git stage area.

According to git help rm, the following command should do the help.

$ git rm --cached filename
$ git rm --cached ./**/*.out




###### Reference http://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste http://stackoverflow.com/questions/1273108/how-do-i-git-rm-a-file-without-deleting-it-from-disk