What's the consensus on monorepoing microrepos int...
# general
a
What's the consensus on monorepoing microrepos into one repo ✖️ Drop the commit history ✔️ Keep the commit history ?
✖️ 1
✔️ 1
Feels like a lot of faffing about for the occasional
git blame
p
Occasional? I pull up git logs and gitk many times every day. commit messages can provide context around why things changed. Spelunking across a boundary (from the monorepo back to the archived microrepo) is a lot harder.
h
I agree git history is invaluable In pantsbuild/pants, we like using squash merges to make our git history more useful. PRs become the atomic change, rather than how many commits it took for a PR to land (e.g.
fix lint
commits). If a PR is too big, we split it up
a
Is there an easy way to do it, because there's 50 different google results, all from 5+ years ago, and doing all of them 60+ times isn't overly appealing
h
Is there an easy way to do it,
What does
it
mean here: easy way to squash merge?
a
merge 60+ repositories, into one, each under a separate directory, and preserve history
p
git-filter-repo
should give you the quick & powerful tools to get it done. https://github.com/newren/git-filter-repo/ I've used it before and quite like it. It's much nicer than dealing with
git-filter-branch
as you script it in python (which is much easier than some of the contortions you have to do in a shell script with filter-branch). This looks like a semi-decent and recent tutorial: https://dev.to/itminds/how-to-split-and-merge-multiple-git-repositories-and-keep-the-history-2938
👀 1
💯 1
a
git subtrees might work. not as 'clean' but 🤷‍♂️ doesn't need any additional tools