There are two steps to taking a file back out of any repo that you manage while not deleting it.
1) Add the file to your .gitignore file.
If you don’t have one already, still a new file called .gitignore into the root of your repo.
Into your gitignote file add the file you want to remove:
path/to/file.txt
2) Tell git to stop looking at the file which was already in the version control system.
git rm --cached path/to/file.text
And you’re there. File still exists, but git will stop looking at it for changes.