Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository contains binaries in sample projects #25

Open
mycroes opened this issue Sep 1, 2016 · 4 comments
Open

Repository contains binaries in sample projects #25

mycroes opened this issue Sep 1, 2016 · 4 comments

Comments

@mycroes
Copy link
Contributor

mycroes commented Sep 1, 2016

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

@mcintyre321
Copy link
Owner

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.

@mycroes
Copy link
Contributor Author

mycroes commented Sep 2, 2016

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
Copy link
Contributor Author

mycroes commented Sep 2, 2016

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

@mcintyre321
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants