git stop tracking directory code example
Example 1: remove a folder from git tracking
git rm -r --cached path_to_your_folder/
Example 2: git stop tracking directory
Step 1. Add the folder path to your repo's root .gitignore file.
path_to_your_folder/
Step 2. Remove the folder from your local git tracking, but keep it on your disk.
git rm -r --cached path_to_your_folder/
Step 3. Push your changes to your git repo.
// Taken from brilliant answer on
// https://stackoverflow.com/questions/24290358/remove-a-folder-from-git-tracking