I’ve just found git-subtree tool that some time ago became a part of main git repo
https://github.com/apenwarr/git-subtree/
However I don’t fully understand what functionality does this tool provide over the already existing “git read-tree” + “git merge -s subtree”. Is the only purpouse of git-subtree – making the resultant commit history look better or does it have more functionality that I’ve overlooked?
The commands you describe reads a subtree into a repository. The
git-subtreecommand has many more options, as described by the documentation. Among others, you can (annotated for simplicity):There are also a variety of flags that aid and manipulate the above. I believe all these options were available before via chains of plumbing commands.
git-subtree.shjust wraps them and makes them considerably easier to execute.