Remove files from Git's index without deleting the actual file
To remove a file from the Git version control system without actually removing the file on disc, use
git rm --cached filewhere
fileis the name of the file to be deleted. See also How do I untrack a file?.