Git: Howto hierarchically merge from the root to the leaf of a branch tree? (Patch stack management) -
i use git version control, have tried out mercurial. while don't mercurial in general, idea of maintaining separated patches mercurial queues (mq) quite appealing. therefore, looking similar (but easier use, more "gitty" , maybe more powerful) in git.
so first explain have in mind:
as example, let's doing test-driven development. master branch follows main repository of software. branched out that, have branch called "feature-test", , branched out that, "feature-implementation":
master |_ feature-test |_ feature-implementation
for each branch, remember parent branch.
implementation work this: checkout feature-test , write test. checkout feature-implementation, rebase current status of feature-test , write implemenation. , on.
at point, update master, , rebase both feature-test , feature-implementation.
as side note: instead of rebasing branches, alternative merge changes parent branch. makes conflict resolution easier. cascading merge through chain of branches rebase, anyway.
of course, process described above contains lot of tedious manual work. looking tooling tasks following:
- while on branch, pull master remote branch tracks , merge changes down chain of branches. when conflict encountered, switch branch occured, allow user resolve conflict, , continue cascading merge (similar git rebase when encounters conflict).
- when checking out branch, cascadingly merge ancestor branches automatically. conflict handling should work in previous point.
the cascading merge should not check out master , branches below (unless necessary resolve conflicts), in order avoid rebuilds due touched unchanged files.
do these requirements make sense? there existing tool similar workflow?
apparently, topgit quite looking for:
- you can define patch*es* (yes, plural!) patch depends on.
- from patch branch, can create patch file.
- "tg update" drags in changes parent patch branch. can recursively.
this sounds promising enough start using , care little details later.
Comments
Post a Comment