This command deletes the file from your working directory and stages the deletion.
git rm [file]
If you want to delete cache data of your file some enter the git rm --cached command.
git rm --cached repo-file
Removes the file from version control but retains the file locally
$ git rm --cached [file]