Stop tracking file without deleting the file from local system.
git rm --cached file
Then add this file to .gitignore and then commit the changes.
.gitignore