The github repository of #NGSchool website has grown to over 5GB. I wanted to reduce the size & simplify this repository, but this task turned out to quite complicated. Instead, I have decided to leave current repo as is (and probably removed it soon) and start new repo for existing version. I could do that, as I don’t care about version earlier than the one I’m currently using. This is short how-to:
- Push all changes and remove .git folder
- Rename existing repo
- Start new repository using old repo name
- Init your local repo and add new remote
- Commit changes and push
git push origin master rm -rI .git
Settings > Repository name > RENAME
Don’t need to create any files as all already exists.
git init git remote add origin git@github.com:USER/REPO
git add --all . && git commit -m "fresh" && git push origin master
Doing so, my new repo size is below 1GB, which is much better compared to 5GB previously.