Remove file from git repo but leave locally
git rm --cached -r logging.cfg
git commit -m "remove config from repo"
Then, to not consider file by git at all, add it to .gitignore
:
cat .gitignore
-------
logging.cfg
...
Note: adding file to.gitignore
may be done beforegit rm --cached