From: Andreas Ericsson <ae@op5.se>
To: Tom Clarke <tom@u2i.com>
Cc: git@vger.kernel.org
Subject: Re: Add --rebase option to git-pull?
Date: Thu, 30 Aug 2007 15:07:54 +0200 [thread overview]
Message-ID: <46D6C12A.5090705@op5.se> (raw)
In-Reply-To: <550f9510708300540u13c77201oe7cbe599c6773364@mail.gmail.com>
Tom Clarke wrote:
> Hi,
>
> I'm in the process of setting up a git environment with a number of
> shared branches. To avoid putting unnecessary merges into the trunk,
> we'd like to normally use rebase when updating private branches. I
> wondered if it would be possible to automatically determine the
> correct remote branch to rebase against.
>
> The most logical place to do this seemed to be in git-pull, so I
> experimented with adding a '--rebase' option, per the (rough) diff
> below.
>
> I'm quite new to git, so is this a good strategy?
>
If I read the patch correctly (which I may not, ofcourse), you're
rebasing the upstream changes to on top of your own work. That's
not something you can readily do, since the parentage chain in
git is supposed to be immutable, so mutating the one you get from
an already published source would be a horribly bad idea indeed.
You need to do it the other way around, so that you rebase your
local changes onto the upstream HEAD prior to pushing.
If that's what the patch does, then I guess all is fine and dandy,
although I think it'd be better to add the merge-strategy rebase
or possibly rebase-ours or rebase-theirs, which can be given as
arguments to git-pull.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2007-08-30 13:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 12:40 Add --rebase option to git-pull? Tom Clarke
2007-08-30 13:07 ` Andreas Ericsson [this message]
2007-08-30 13:17 ` Tom Clarke
2007-08-30 13:16 ` Johannes Schindelin
2007-08-30 15:10 ` Tom Clarke
2007-08-30 15:23 ` Johannes Schindelin
2007-08-30 15:26 ` Tom Clarke
2007-08-30 16:54 ` Jakub Narebski
2007-08-30 20:22 ` Alex Riesen
2007-08-30 20:36 ` Tom Clarke
2007-08-30 20:44 ` Tom Clarke
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=46D6C12A.5090705@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=tom@u2i.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 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).