-
Notifications
You must be signed in to change notification settings - Fork 111
Changes After April 2016 Cleanup
On April 29, 2016, the binary history of area515/Creation-Workshop-Host was cleaned up to reduce the download footprint of the repo from 500MB to 30MB by using the BFG Repo Cleaner to remove the old checked-in zip releases.
If you have forks or clones of area515/Creation-Workshop-Host from before this date, you will need to perform some steps to synchronize your fork with the re-written history.
The easiest way to deal with the change is to delete your repo or fork and then re-clone or re-fork it.
- Copy any un-pushed changes aside to some location outside of your repo
- Delete your local repo:
rm -r Creation-Workshop-Host) - Clone the remote repo:
git clone https://github.com/area515/Creation-Workshop-Host - Manually re-apply any changes you copied aside in step 1.
You're done!
- Copy any un-pushed changes aside to some location outside of your repo
- Delete your local repo:
rm -r Creation-Workshop-Host - Delete your fork from github: https://help.github.com/articles/deleting-a-repository/
- Create a new fork of area515/Creation-Workshop-Host: https://github.com/area515/Creation-Workshop-Host
- Manually re-apply any changes you copied aside in step 1.
This is by far the easiest way to bring your history in-line with area515 so that PRs will work again, and will cleanup your own fork's history so that clones of your repo will be the post-clean 30MB instead of 500MB. The downside of this procedure is that this may reset your Stars and Watches.
This is only relevant for forks. Local clone should just be re-cloned, there are no drawbacks to doing that. For a fork, you may want to retain your existing Stars or Watches. I would highly recommend that you consider whether that is worthwhile before embarking on this path.
There are two goals that we need to handle separately down this path:
- Updating your GitHub repo history so that it matches area515's post-clean history. This will enable you to properly submit PRs.
- Cleaning up the binary contents of your repo so that its actual size drops from 500MB to 30MB
Completing this will enable you to properly submit PRs, but the size of clones of your repo will remain the same (e.g. still 500 MB)
- Copy any un-pushed changes to some location outside of your repo
- Delete your local repo:
rm -r Creation-Workshop-Host - Clone the cleaned area515 repo:
git clone https://github.com/area515/Creation-Workshop-Host area515-cwh cd area515-cwh- Change the origin URL to be your own fork:
git remote set-url origin https://github.com/<YOUR USERNAME>/Creation-Workshop-Host - Force push the local repo to your remote fork - this will overwrite your repo's contents:
git push --force origin master - Delete the local repo (
rm -r area515-cwh) and clone your fork again (`git clone https://github.com//Creation-Workshop-Host
If you are satisfied with just being able to submit PRs again and don't care about the download size of your repo. You can stop here and re-apply any un-pushed changes that you copied aside in step 1.
If you wish to now clean up your repo, proceed to the next section.
To actually clean up your fork, you will need to go through the same cleanup process that I used to clean area515's repo. This is annoying, you might want to reconsider going down the Easy Way.
- Download the BFG repo cleaner https://rtyley.github.io/bfg-repo-cleaner/
- Make a bare repo clone of your fork:
git clone --mirror https://github.com/<YOUR USERNAME/Creation-Workshop-Host - Use BFG to clean the repo:
java -jar bfg-1.12.12.jar --delete-files 'cwh*.zip' --strip-biggest-blobs 100 Creation-Workshop-Host.git cd Creation-Workshop-Host.git- Make git garbage collect:
git reflog expire --expire=now --all && git gc --prune=now --aggressive - Push your changes back to github:
git push - Delete your bare repo (e.g.
rm -r Creation-Workshop-Host.git) - Do Update GitHub Repo History steps again!!!
Now you can re-apply any un-pushed changes you set aside and re-clone your fork.