This workshop is a hands-on session to help you clean up your monorepo. We will be using popular open source tools to discover and aid in the removal of large binaries. We will also learn methods of decreasing the size of our repository, but still preserving git history by using git replace to graft two repositories together.
To run the workshop locally, you will need to install the following:
- Git 2.34 or newer
- git filter-repo
- Requires python3 >= 3.5
pip3 install git-filter-repo
- git-sizer
- Download and extract a .zip for the appropriate platform
- Alternatively, if you have
go
installed, you can run install git-sizer with the go package manager:go get github.com/github/git-sizer
If you do not have a local fresh clone of a monorepo of your own to experiment with, you may also clone from the example repo that is used throughout the examples in this workshop:
git clone https://github.com/git-merge-workshops/a-bad-monorepo.git
You will then want to create an additional copy of the repository as we experiment with different methods of clean up.
cp -r a-bad-monorepo a-bad-monorepo-filter-repo
Thank you for taking the time to walkthrough this workshop on cleaning your monorepo!:tada: I hope you learned something new and are able to apply some of these techniques in your own monorepo analysis. Please check out the other presentations on Monorepos at Git Merge 2022.