I\'m trying to remove a previously tracked directory from git, which works, but it\'s being added back with each subsequent git add .
, git add -A
, etc.
I created a repository to try and duplicate your issue, and I got the first answer from http://www.stackoverflow.com/questions/11451535/gitignore-not-working to work.
Here's my repo if you are curious: https://github.com/IAMZERG/so_project_gitignore
Try adding this to the .gitignore instead:
**/directory_to_remove
After that, run git rm --cached directory_to_remove -r
git status should show that you deleted a bunch of files in the directory you are trying to remove. Then, commit and push to your remote, and everything should be golden... Maybe?