All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Bazaar <bazaar@lists.canonical.com>,
	Git Mailing List <git@vger.kernel.org>,
	mercurial mailing list <mercurial@selenic.com>
Subject: rebase-with-history -- a technique for rebasing without trashing your repo history
Date: Thu, 13 Aug 2009 14:46:07 +0200	[thread overview]
Message-ID: <4A840B0F.9060003@alum.mit.edu> (raw)

Sorry to cross-post, but I think this might be interesting to all three
projects...

I've been thinking a lot about the problems of tracking upstream changes
while developing a feature branch.  As I think everybody knows, both
rebasing and merging have serious disadvantages for this use case.
Rebasing discards history and makes it difficult to share
work-in-progress with others, whereas merging makes it difficult to
prepare a clean patch series that is suitable for submission upstream.

I've written some articles describing another possibility, which
combines the advantages of both methods.  The key idea is to retain
rebase history correctly, on a patch-by-patch level.  The resulting DAG
retains enough history to prevent problems with merge conflicts
downstream, while also allowing the patch series to be kept tidy.

(Please note that this technique only works for the typical "tracking
upstream" type of rebase; it doesn't help with rebases whose goals are
changing the order of commits, moving only part of a branch, rewriting
commits, etc.)

For more information, please see the full articles:

* A truce in the merge vs. rebase war? [1]
* Upstream rebase Just Works™ if history is retained [2]
* Rebase with history -- implementation ideas [3]

I'd appreciate feedback!

Michael

[1]
http://softwareswirl.blogspot.com/2009/04/truce-in-merge-vs-rebase-war.html
[2]
http://softwareswirl.blogspot.com/2009/08/upstream-rebase-just-works-if-history.html
[3]
http://softwareswirl.blogspot.com/2009/08/rebase-with-history-implementation.html

             reply	other threads:[~2009-08-13 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 12:46 Michael Haggerty [this message]
2009-08-13 16:12 ` rebase-with-history -- a technique for rebasing without trashing your repo history Björn Steinbrink
2009-08-13 22:39   ` Michael Haggerty
2009-08-13 23:30     ` Björn Steinbrink
2009-08-14 21:21       ` Michael Haggerty
2009-08-14 21:40         ` Nanako Shiraishi
2009-08-15  3:36         ` Björn Steinbrink
2009-08-14  3:17     ` Sitaram Chamarty
2009-08-13 17:39 ` Bryan O'Sullivan
2009-08-13 20:31 ` Abderrahim Kitouni

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=4A840B0F.9060003@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=bazaar@lists.canonical.com \
    --cc=git@vger.kernel.org \
    --cc=mercurial@selenic.com \
    /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.