I have a dir /data and my file main.py. I use this as a beta file and change this first, rather than deploying in production directly.
Doing this manipulates the files in /data, and when I later commit it, it commits all the data/ files too, which of course I don't want to.
I tried adding the dir data/ in .gitignore, and then executing
git rm -rf --cached .
git add .
but when I try to commit, it shows I removed all the files in data/, which is exactly not I want.
What I wanted was: It just stops tracking the files, i.e. it will neither remove them, nor commit the changed files. How can I do this?