From: Daniel Knittl-Frank <knittl89@googlemail.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Using two-dot range notation in `git rebase`?
Date: Wed, 28 Jul 2021 18:33:54 +0200 [thread overview]
Message-ID: <CACx-yZ1Je+tnZdJ21gDPeuQa-QTuY2t9mDujNr7wqJWFMwwzxA@mail.gmail.com> (raw)
In-Reply-To: <b3b5f044-8c76-ec71-45d6-1c7fea93c519@iee.email>
Hi Philip,
git log upstream..HEAD
gives you all commits reachable from "HEAD", but not reachable from
"upstream". If you want to rebase this range and copy it onto newbase,
you'd run
git rebase --onto newbase upstream
This will take the commits upstream..HEAD (the HEAD argument is
implicit), and you end up with
newbase-.....-HEAD
containing all commits from (the previous) "HEAD" up to (but
excluding) "upstream". If "newbase" and "upstream" are identical, the
command can be simplified to `git rebase newbase`.
Maybe I'm misunderstanding the problem? Can you give an example of
`git rebase --onto newbase upstream branch` not working as expected?
Regards
Daniel
On Wed, Jul 28, 2021 at 5:38 PM Philip Oakley <philipoakley@iee.email> wrote:
>
> Is there a reasonable way to use the two-dot range notation in git
> rebase, particularly in an --onto situation?
>
> In my case I have a short series that depends on both some existing Git
> for Windows (GfW) patches (`main` branch), and some patches now in
> `git/master`. I'm now able to rebase it onto the GfW `shears/master`
> branch which contains both sets of patches (and one that was in the last
> git release).
>
> It felt that it ought to be possible to use a simple two dot range to
> extract my series, rather than identifying the individual end points in
> a similar manner to that used in the description"set of commits .. shown
> by `git log <upstream>..HEAD`".
>
> Or is this something that could be a project?
> --
>
> Philip
>
>
--
typed with http://neo-layout.org
next prev parent reply other threads:[~2021-07-28 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 15:38 Using two-dot range notation in `git rebase`? Philip Oakley
2021-07-28 16:33 ` Daniel Knittl-Frank [this message]
2021-07-29 9:58 ` Philip Oakley
2021-07-29 10:21 ` Jeff King
2021-07-29 14:11 ` Philip Oakley
2021-07-29 17:09 ` Junio C Hamano
2021-07-29 19:05 ` Sergey Organov
2021-07-29 17:13 ` Junio C Hamano
2021-07-29 17:29 ` Jeff King
2021-07-29 19:33 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACx-yZ1Je+tnZdJ21gDPeuQa-QTuY2t9mDujNr7wqJWFMwwzxA@mail.gmail.com \
--to=knittl89@googlemail.com \
--cc=git@vger.kernel.org \
--cc=philipoakley@iee.email \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).