News for hackers. Stuff that matters.
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.