I have been working on a POC and now have been asked to upload it to our GitHub. I have done that, but today I notice the bin and obj folder being included.
So I opened up my .gitignore file to check I've added the Visual Studio profile. Which it was.. I could see [Bb]in/ and [Oo]bj/ are included.
So I tried to remove the folder from Git by typing:
git rm --cached -r [folder]/bin
After doing that I saw all the *dll being removed, I checked in Team Explorer and noted that the files were all removed.
Committed, and rebuilt to see that all the bin files returned...
it's not just one project in the solution. It seems to be all of them doing this. I have my .gitignore file in the root of my solution. As well as the .git folder. Screen shot of folder structure.
.gitignore file to the project folder. didn't work**/[Bb]in/ & **[Bb]in/ .. no change. Any ideas on what I'm missing here?
My .gitignore is an exact copy of this here
I reverted my **/[Bb]in/ changes to see if I broke something.
git ignore ignore the file that hadn't been tracked yet, so if a file was committed it will reappear again.
you can try:
git rm -r --cached .
git add .
then
git commit -am "Remove ignored files"
as suggested here
or go for a more radical approach:
rm
git init)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With