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.gitignoremay be done beforegit rm --cached