How to remove a file from Git but not from local file system

To remove the file from the repo and not delete it from the local file system use:

git rm --cached <file>

Note:
If you use:

git rm <file>

it removes the file from the repo but also deletes it from the local file system.