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 works for me:
*.exe
*.pdb
*.manifest
*.cache
If you are using GitHub Desktop as I am using it, you can just right click the file you want to exclude or right click it and exclude by extension:
This will automatically generate a .gitignore
file for you with the code like above. You can download GitHub Desktop here: GitHub Desktop for Windows 64-bit.
I know it is an old question, but I've decided to share my approach which excludes exactly bin/Debug, bin/Release etc.
*/**/bin/Debug
*/**/bin/Release
*/**/obj/Debug
*/**/obj/Release
This may be slightly off topic, but whenever starting to create a new project, I usually use GitIgnore.IO for creating my initial gitignore file and then I tweek it from there according to my needs.