how to stop git to run in a directory code example
Example 1: remove a folder from git tracking
git rm -r --cached path_to_your_folder/
Example 2: git deleted file error
$ git reset --hard HEAD~1
git rm -r --cached path_to_your_folder/
$ git reset --hard HEAD~1