From: Yann Dirson <ydirson@free.fr>
To: "git " <git@vger.kernel.org>
Subject: Leveraging --rebase-merges --update-refs mechanism to rebase several branches in one run
Date: Sat, 6 Jan 2024 20:05:32 +0100 (CET) [thread overview]
Message-ID: <133456672.1820149400.1704567932308.JavaMail.root@zimbra39-e7> (raw)
In-Reply-To: <763603689.1820092086.1704566524953.JavaMail.root@zimbra39-e7>
This idea comes from a repo[1] where I am experimenting with code variants:
on one side I have a branch where I add to the core mechanisms, and on the
other(s) I have several branches where I experiment with different rendering
options.
There are indeed 2 different workflows here:
- improving the variants themselves, where occasionally some fixup or new
commit for the core branch gets introduced
- adding feature to the core branch, then merging that into each variant,
where fixups already appear quite regularly
That produces a set closely-related branches with lots of merges, and applying
the fixups is a bit tricky.
The "core + 1 variant" case pretty much works out of the box, with --rebase-merges
and --update-refs generating a perfect instructions sheet.
But if I was to rebase just one variant while rewriting the core branch, obviously
all other variants would still fork off the pre-rewrite core branch, and we'd loose
all chances of automating the same work on the other variants.
OTOH, if I get `git-rebase` to generate the instruction sheets for those other
variants first, strip them (manually) from the common part, and insert them in the
instruction sheet of my "core + 1 variant" case ... I do get the whole of my branches
rebased together, and sharing the updated core.
So the question is, would there be any obstacles to let git-rebase automate this
completely? By chance it could even be a trivial change?
I guess we'd only want this feature to be enabled under certain conditions, like
--update-refs being specified so the many heads of the rebase would be reachable.
[1] https://github.com/ydirson/test-yew-tutorial/tree/opr is the "core" branch,
and branches opr-* are the variants
next parent reply other threads:[~2024-01-06 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <763603689.1820092086.1704566524953.JavaMail.root@zimbra39-e7>
2024-01-06 19:05 ` Yann Dirson [this message]
2024-01-07 8:57 ` Leveraging --rebase-merges --update-refs mechanism to rebase several branches in one run Johannes Sixt
2024-01-07 11:37 ` Yann Dirson
2024-01-07 15:31 ` Interactive rebase doc (Was: Leveraging --rebase-merges --update-refs mechanism to rebase several branches in one run) Yann Dirson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=133456672.1820149400.1704567932308.JavaMail.root@zimbra39-e7 \
--to=ydirson@free.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.