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
' directory. I've added bin/Debug
to my .gitignore
file, but it doesn't seem to work - it is including the entire contents of the bin
directory. What would the correct entry be to do this?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Right click on those file names you want to ignore from "Git Desktop", then add them to
.gitignore
file. Here gitignore file will be automatically created. Check in that file to git.I know it is an old question, but I've decided to share my approach which excludes exactly bin/Debug, bin/Release etc.
This works for me:
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.