.gitignore and Visual Studio project: Ignore bin/Debug directory but not bin/Release directory

后端 未结 9 1003
一个人的身影
一个人的身影 2021-01-30 03:51

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

9条回答
  •  天涯浪人
    2021-01-30 04:28

    Running the following command worked for me (thanks to "orourkedd"):

    git rm -r . --cached
    

    I manually added the .gitignore file but it wasn't taken into consideration until I ran this command.

    I then had to commit again and all good to go now. /bin and /obj folders are properly excluded now.

提交回复
热议问题