How to remove subfolders/subdirectories from git tracking

From https://stackoverflow.com/questions/2545602/how-to-git-ignore-subfolders-subdirectories To ignore Solutions/projects/bin/Debug but not bin/Debug Solution/*/bin/Debug you can also use the ** wildcard to match any level of subdirectories: **/bin/Debug/ Bonus Content: Remove existing git tracked files Now say you had a folder (commited to your git repository) that you now wanted to remove altogether from your repository. First add it to your gitignore file. Then do one of the following steps. https://stackoverflow.com/questions/7075923/resync-git-repo-with-new-gitignore-file Extreme git rm -r --cached git add ....

December 25, 2021 · 1 min · Harsh Kumar