|
|
|
|
|
by eru
1058 days ago
|
|
> I also wonder, how much better git could be if it was based on DAGs not trees [...] Git generally supports DAGs. > [...] corollarily I‘d like to rebase subtrees (sub-DAGs) instead of single branches. Rebasing is something you do to the commit graph, which is a DAG. Branches only come in incidentally. Branches in git are really just mutable pointer to immutable commits. What you are describing is probably some useful workflow, I guess? |
|
IOW
ends at shaZ, git walks backwards from it until the commit whose parent is shaY to produce the list of commits to cherry-pick onto shaXSo presumably this would be useful:
with shaZn being optional and consisting of all leaves down from shaYThis is achievable with git but it's not just doing n rebases like so:
because each rebase would produce different commits for parts that are common to shaZ n1 and shaZn2 ancestry, so one would have to first find all the branching points and do partial rebases onto the rebased parent commits in order.It definitely can be done (manually or automatically) but is not as trivial as one might think.