Strip out old files
Closed this issue · 2 comments
ngraymon commented
Use git-filter-repo or BFG Repo-Cleaner to strip unnecessary files
ngraymon commented
Originally used bfg to clean the repository but ran into an issue with the pull requests:
! [remote rejected] refs/pull/53/head -> refs/pull/53/head (deny updating a hidden ref)
! [remote rejected] refs/pull/57/head -> refs/pull/57/head (deny updating a hidden ref)
! [remote rejected] refs/pull/58/head -> refs/pull/58/head (deny updating a hidden ref)
error: failed to push some refs to 'https://github.com/ngraymon/residual_term_builder.git'
which made more sense after reading https://stackoverflow.com/questions/50343697/cleaning-git-repository-bfg-repo-cleaner-repo-size-is-still-large-after-i-pu
so I thought my only option was to delete them using Github-support
but instead there is an alternative option
https://crushingcode.nisrulz.com/posts/rewriting-the-history/
https://christoph.ruegg.name/blog/git-howto-mirror-a-github-repository-without-pull-refs.html
got to your-project.git
folder and run git config -e
then change
fetch = +refs/*:refs/*
to
fetch = +refs/heads/*:refs/heads/*
fetch = +refs/tags/*:refs/tags/*
fetch = +refs/change/*:refs/change/*
ngraymon commented
Done