I want to ignore bin and obj folders from my git repository. As I\'ve found out, there is no easy way to do this in .gitignore. So, are there any other way? Using clean solu
If you try through source tree and still the ignore files are not coming in , go to tools-->option->Git and then select location of the .gitignore
@Raphael Pinel is absolutely correct. .gitignore doesn't work if the files are already in the Git repository.
I'm using VS2019 and Azure DevOps as my Git repository. Here's how I fixed it.
In Visual Studio, add .gitignore file (if necessary) and push that file to the repository. Team Explorer->Changes->Right Click .gitignore->Stage. Then commit staged, then sync. Go to Azure DevOps website. Delete bin/obj folders from Git repository. In Visual Studio, Team Explorer->Changes->"Undo Changes" to those folders. Team Explorer->Synch->Pull to update local Git repository. You can now build your project and Git will ignore the folders as specified in the .gitignore file.
If you are using Visual Studio then there is a simple way to do this.
It will create a default .gitignore file, which will ignore most of common folders & files that will used by framework/language.