答案1
您不必将第二个“提交”添加为第一个“提交”节点的子节点,而是可以将其插入到与它们相同的级别。
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
for tree={calign=last},
[HEAD
[tag,no edge]
[branch
[commit,no edge,tikz={\draw()--(!n);}
[tree
[tree
[tree
[tree
[blob]]
[blob]]
[blob]]]]
[commit
[tree
[tree
% [shared blob here]
[tree
% [shared blob here]
[blob]]]]]]]
\end{forest}
\end{document}