untrack folder in gitignore file code example
Example 1: remove a folder from git tracking
git rm -r --cached path_to_your_folder/
Example 2: apply gitignore after commit
git rm --cached $file
git rm -r --cached path_to_your_folder/
git rm --cached $file