git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Staudt <koraktor@gmail.com>
To: ryenus <ryenus@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [feature request] find git commit log before rebase
Date: Thu, 26 May 2016 22:37:37 +0200	[thread overview]
Message-ID: <CA+xP2SZgYYcQOVcWQsEY2YccW3cwONOhXOvViCfH2ONvm5-G8g@mail.gmail.com> (raw)
In-Reply-To: <CAKkAvax5Yf2=qLhVkn8EgkNEgHL97Doxr3JWR10aqxksYVsYXA@mail.gmail.com>

Hi.

I think what you want is `git reflog` (http://git-scm.com/man/reflog).

git reflog b

Will tell you the commits b pointed to in the past.

Best regards,
    Sebastian

2016-05-26 18:55 GMT+02:00 ryenus <ryenus@gmail.com>:
> Assuming I have branches master (m), and a side branch (b), with a
> history tree like below:
>
> m0 --- m1 -- m2 -- m3 -- m4 --- master (m)
>         \          /      \
>         b1 ------ b2       b3 -- b4 -- branch (b) (HEAD)
>                   |
>       (tag:POINT_BEFORE_REBASE)
>
> The history of branch b is can be described as:
>
> 1. branch b is forked at point of m1
> 2. branch b is merged to master into m3,
> 3. branch b then is rebased (fast-forward) from b2 to m4
> 4. then branch b started its new life as b3 b4 after rebase
>
> With the following command: I can find b3 and b4 since last fork-point
>
>     git log --oneline $(git merge-base --fork-point master)..b
>
> But how to find out commits b1 b2, given the fact that b2 is the point
> before rebase?
>
> I understand it can be achieved via:
>
>     git log --oneline m2..b2
>
> That's because I know b2 is the point before rebase,
> and m2 is another child of the subsequent merge commit m3
>
> I wonder how to do this with an simple (enough) command without me
> looking through the history and find b2 and m2 manually?
>
> Thanks!
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-05-26 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26 16:55 [feature request] find git commit log before rebase ryenus
2016-05-26 20:37 ` Sebastian Staudt [this message]
     [not found] ` <CA+xP2SYXUCfLHcyfQu6SLhZ6jRptp3gK0myatKVUxyP-2B=dPQ@mail.gmail.com>
2016-05-27  2:57   ` ryenus

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=CA+xP2SZgYYcQOVcWQsEY2YccW3cwONOhXOvViCfH2ONvm5-G8g@mail.gmail.com \
    --to=koraktor@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ryenus@gmail.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).