https://pantsbuild.org/ logo
#general
Title
# general
a

ambitious-actor-36781

05/20/2021, 3:47 PM
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

proud-dentist-22844

05/20/2021, 3:51 PM
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

hundreds-father-404

05/20/2021, 3:56 PM
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

ambitious-actor-36781

05/20/2021, 4:10 PM
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

hundreds-father-404

05/20/2021, 4:11 PM
Is there an easy way to do it,
What does
it
mean here: easy way to squash merge?
a

ambitious-actor-36781

05/20/2021, 4:12 PM
merge 60+ repositories, into one, each under a separate directory, and preserve history
p

proud-dentist-22844

05/20/2021, 4:31 PM
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

ambitious-actor-36781

05/20/2021, 4:43 PM
git subtrees might work. not as 'clean' but 🤷‍♂️ doesn't need any additional tools
5 Views