From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Csaba Henk <csaba-ml@creo.hu>
Subject: Re: Is rebase always destructive?
Date: Mon, 1 Dec 2008 12:54:35 +0100 [thread overview]
Message-ID: <200812011254.36109.johan@herland.net> (raw)
In-Reply-To: <slrngj7jch.2srb.csaba-ml@beastie.creo.hu>
On Monday 01 December 2008, Csaba Henk wrote:
> Hi,
>
> When doing a rebase, I can find a number of reasons for which one
> might feel like to preserve the rebased branch (that is, perform an
> operation which copies the branch over a new base, not moves).
>
> - For example, a successful rebase doesn't necessarily mean that the
> code, as of the rebased branch, is consistent and compiles. That
> is, the rebase can be broken even if git can put things together
> diff-wise. In such a case I wouldn't be happy to lose the original
> instance of the branch.
>
> - Or I might want to build different versions of the program, and
> each version of it needs a given set of fixes (the same one). Then
> rebasing my bugfix branch is not a good idea, I'd much rather copy it
> over all those versions.
>
> I can't see any option for rebase which would yield this cp-like
> behaviour. Am I missing something? Or people don't need such a
> feature? (Then give me some LART please, my mind is not yet gittified
> enough to see why is this not needed.) Or is it usually done by other
> means, not rebase?
The operation you refer to as "cp-like" rebase behaviour is equivalent
to cherry-picking a range of commits. The latter has been discussed
extensively on this list, although I'm not sure any conclusion has been
reached.
I would also very much like to have this operation available in either
form ("git rebase --copy" or "git cherry-pick from..to"), although I'd
probably prefer the "git cherry-pick from..to" form.
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2008-12-01 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 11:41 Is rebase always destructive? Csaba Henk
2008-12-01 11:54 ` Johan Herland [this message]
2008-12-01 12:11 ` Nick Andrew
2008-12-01 17:37 ` Csaba Henk
2008-12-01 20:19 ` Robin Rosenberg
2008-12-01 16:45 ` Andreas Ericsson
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=200812011254.36109.johan@herland.net \
--to=johan@herland.net \
--cc=csaba-ml@creo.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).