Re: tracking a tree that doesn't progress linearly
From: Catalin Marinas <hidden>
Date: 2016-06-15 22:42:11
Paul Mackerras [off-list ref] wrote:
I want to be able to publish a git tree for others to follow but I also want to be retain the freedom to remove commits and/or rebase commits in the tree. For example, if someone sends me a patch and I put it in the tree, then they send me a revised version, I want to be able to roll back to just before I applied the older patch and start again from there.
I'm facing a similar problem. I use StGIT for my development branch
(usually with less than 20 patches) but I would like to export a HEAD
for others to pull from. When rebasing the patches with StGIT, the new
HEAD wouldn't be a descendant of the old one.
The partial solution I got to was to make the master branch available
to people and the devel branch private. Initially, the master branch
would pick the patches ('stg pick') from the devel branch which I want
to make public. When I'm happy with the patches on the master branch,
I run 'stg commit' and store them permanently (you won't be able to
modify them). After permanently storing the patches, I can use the
master branch in the normal way with GIT (merge, pull, push etc.).
When I get a patch in the devel branch updated, I just run 'stg pick
patchname@devel' in the master branch. Because of the nature of the
three-way merge, the new picked patch should only contain the
differences from the previous one. It might also cause conflicts which
need resolving if the new patch modifies lines which were present in
the old patch (i.e. not only additions or removals). At this point you
can change the patch description since the new picked patch only
represents an update to the old one and not the full feature.
The only little drawback I see with this approach is that merging in
the latest changes from the mainline kernel could produce identical
conflicts (if any) in both master and devel branches.
--
Catalin