EmbeddedResourceVirtualPathProvider icon indicating copy to clipboard operation
EmbeddedResourceVirtualPathProvider copied to clipboard

Repository contains binaries in sample projects

Open mycroes opened this issue 9 years ago • 4 comments

Not sure how you feel about this, but at my work I always avoid having binaries in repositories.

mycroes avatar Sep 01 '16 21:09 mycroes

An oversight when the .gitignore was set up. It would be great to clean up, but I think it would also involve rewriting the project history to remove the binaries (and reduce the repo bloat). Not sure how to do that.

mcintyre321 avatar Sep 02 '16 08:09 mcintyre321

So this will be fun:

echo packages/ > newignore
cat .gitignore >> newignore
mv newignore .gitignore
git add .gitignore
git commit -m 'fixup! Initial drop of code'
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch packages/ nuget/lib/net40/EmbeddedResourceVirtualPathProvider.*' master
git rebase -i --root --preserve-merges
git push -f origin master:master

The rebase will give you some merge conflicts on .gitignore, they're all easy to solve. I used the newignore to put packages/ at the top of the .gitignore file, saves some additional merge conflicts. Save the last step for when you're certain this is what you want ;-)

mycroes avatar Sep 02 '16 09:09 mycroes

Oh by the way, this took me 20 mins to get right as well.

mycroes avatar Sep 02 '16 09:09 mycroes

I'll give it go at the weekend. With a stiff drink in my hand :)

mcintyre321 avatar Sep 02 '16 10:09 mcintyre321