Re:Monorepoize – Bash scripts for creating a monorepo out of...
by fgeiger on Monday April 27, 2020 @02:02AM
(#22993283)
What is the advantage over using `git subtree`?
[ Parent
| on HN ]
Re:Monorepoize – Bash scripts for creating a monorepo out of...
by leethargo on Monday April 27, 2020 @06:50AM
(#22994668)
Git subtree wouldn't preserve hashes of the existing history?
Re:Monorepoize – Bash scripts for creating a monorepo out of...
by eithed on Monday April 27, 2020 @06:57AM
(#22994691)
You can preserve history. You can also squash it.
Re:Monorepoize – Bash scripts for creating a monorepo out of...
by leethargo on Monday April 27, 2020 @07:30AM
(#22994817)
Maybe I don't know about git subtree. I guess it can "preserve history" in the sense of keeping a corresponding new commit for every old commit, but they wouldn't have the same hash id?
Re:Monorepoize – Bash scripts for creating a monorepo out of...
by sgn on Monday April 27, 2020 @08:08AM
(#22995027)
They have everything the same with old subtree.
From commit message, history, object ID, commit ID.
git-subtree(1) also allows splitting subtree.
git-subtree(1) uses plumbing git command, which is stable interface, unlike this one, which uses porcelain command.
IIRC, Git’s maintainer uses git-subtree(1) to merge gitk and git-gui to Git.