I have a C# Visual Studio project in a git repository. I want to ignore the contents bin/Debug
directory but not the contents of the bin/Release
\' dire
This typically happens because the .gitignore was added after the files were committed. The .gitignore tells git to ignore untracked files that match, once stuff is committed the ignore will no longer work. One way to fix it is to remove the bin/debug folder (manually through explorer/powershell/bash), then commit the removals. Once that is done the ignores should work as you expect.
git add -A
git commit