# git-rebase and reflog

8 messages from 2008-04-30 to 2008-04-30. Participants: Ping Yin, Jakub Narebski, Brandon Casey, Avery Pennarun, Junio C Hamano.
Thread: https://gitlist.dev/t/13334

## Ping Yin, 2008-04-30 16:04

Subject: git-rebase and reflog
Message-ID: <46dff0320804300904i3402b5e7wf827f6759bc52901@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320804300904i3402b5e7wf827f6759bc52901%40mail.gmail.com

```
The history of git-rebase will go into reflog. This kind of behaviour
makes me annoyed when using git-reflog where i can see so many useless
intermediate log entries (generated by rebase).

So how about not recording the intermediate commits to reflog?


-- 
Ping Yin

```

## Jakub Narebski, 2008-04-30 16:37

Subject: Re: git-rebase and reflog
Message-ID: <m3d4o7nvt2.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3d4o7nvt2.fsf%40localhost.localdomain
In-Reply-To: <46dff0320804300904i3402b5e7wf827f6759bc52901@mail.gmail.com>

```
"Ping Yin" <pkufranky@gmail.com> writes:

> The history of git-rebase will go into reflog. This kind of behaviour
> makes me annoyed when using git-reflog where i can see so many useless
> intermediate log entries (generated by rebase).
> 
> So how about not recording the intermediate commits to reflog?

If I remember and understand it correctly, because currently rebase
uses detached HEAD, the intermediate steps would go into HEAD reflog,
but only final step would go into branch reflog...

Please correct me if I am wrong.
-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Ping Yin, 2008-04-30 16:56

Subject: Re: git-rebase and reflog
Message-ID: <46dff0320804300956x7e4f34efle39f6cad2e98a2de@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320804300956x7e4f34efle39f6cad2e98a2de%40mail.gmail.com
In-Reply-To: <m3d4o7nvt2.fsf@localhost.localdomain>

```
On Thu, May 1, 2008 at 12:37 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>
> "Ping Yin" <pkufranky@gmail.com> writes:
>
>  > The history of git-rebase will go into reflog. This kind of behaviour
>  > makes me annoyed when using git-reflog where i can see so many useless
>  > intermediate log entries (generated by rebase).
>  >
>  > So how about not recording the intermediate commits to reflog?
>
>  If I remember and understand it correctly, because currently rebase
>  uses detached HEAD, the intermediate steps would go into HEAD reflog,
>  but only final step would go into branch reflog...
>
>  Please correct me if I am wrong.

I am also not clear about this.

If your are right, how can i look over the branch reflog. I know the
master@{1} syntax, but i want to see master@{1}, master@{2} until
master@{n} in a single command just as how 'git reflog' shows HEAD@{1}
 to HEAD@{n}.


-- 
Ping Yin

```

## Brandon Casey, 2008-04-30 17:05

Subject: Re: git-rebase and reflog
Message-ID: <4818A6CA.5000409@nrlssc.navy.mil>
URL: https://gitlist.dev/e/4818A6CA.5000409%40nrlssc.navy.mil
In-Reply-To: <46dff0320804300956x7e4f34efle39f6cad2e98a2de@mail.gmail.com>

```
Ping Yin wrote:

> If your are right, how can i look over the branch reflog. I know the
> master@{1} syntax, but i want to see master@{1}, master@{2} until
> master@{n} in a single command just as how 'git reflog' shows HEAD@{1}
>  to HEAD@{n}.

Have you checked the documentation for 'git reflog'?

It says:

   The subcommand "show" (which is also the default, in the absence of any
   subcommands) will take all the normal log options, and show the log of
   the reference provided in the command-line (or `HEAD`, by default).

So, 'git reflog show master' should get you what you want.

You may also want to check out the '-g' option to git-log. For example,
'git log -g master'.

-brandon

```

## Ping Yin, 2008-04-30 17:13

Subject: Re: git-rebase and reflog
Message-ID: <46dff0320804301013o17da30cg1fd847beca94ff58@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320804301013o17da30cg1fd847beca94ff58%40mail.gmail.com
In-Reply-To: <4818A6CA.5000409@nrlssc.navy.mil>

```
On Thu, May 1, 2008 at 1:05 AM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
> Ping Yin wrote:
>
>  > If your are right, how can i look over the branch reflog. I know the
>  > master@{1} syntax, but i want to see master@{1}, master@{2} until
>  > master@{n} in a single command just as how 'git reflog' shows HEAD@{1}
>  >  to HEAD@{n}.
>
>  Have you checked the documentation for 'git reflog'?
>
>  It says:
>
>    The subcommand "show" (which is also the default, in the absence of any
>    subcommands) will take all the normal log options, and show the log of
>    the reference provided in the command-line (or `HEAD`, by default).
>
>  So, 'git reflog show master' should get you what you want.

Oh, i missed that. Maybe we should add an example section.

>
>  You may also want to check out the '-g' option to git-log. For example,
>  'git log -g master'.

Oh, wonderful.

However, i still think the intemediate commits of git-rebase needn't
go into HEAD's reflog because it's totally useless.



-- 
Ping Yin

```

## Avery Pennarun, 2008-04-30 17:22

Subject: Re: git-rebase and reflog
Message-ID: <32541b130804301022l3a072f2p47ccb5639cd8a24e@mail.gmail.com>
URL: https://gitlist.dev/e/32541b130804301022l3a072f2p47ccb5639cd8a24e%40mail.gmail.com
In-Reply-To: <46dff0320804301013o17da30cg1fd847beca94ff58@mail.gmail.com>

```
On 4/30/08, Ping Yin <pkufranky@gmail.com> wrote:
>  However, i still think the intemediate commits of git-rebase needn't
>  go into HEAD's reflog because it's totally useless.

I don't know, I can imagine a situation where I'm doing a rebase, I
get a conflict, I type the wrong command, and so I lose a bunch of my
intermediate work because I was an idiot.  The reflog sounds like it
would be helpful here as much as anywhere.

Have fun,

Avery

```

## Junio C Hamano, 2008-04-30 17:34

Subject: Re: git-rebase and reflog
Message-ID: <7v7ief1c27.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7ief1c27.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <46dff0320804301013o17da30cg1fd847beca94ff58@mail.gmail.com>

```
"Ping Yin" <pkufranky@gmail.com> writes:

> However, i still think the intemediate commits of git-rebase needn't
> go into HEAD's reflog because it's totally useless.

Actually I use it from time to time when I need to compare intermediate
steps of _previous_ run of the same rebase while rebasing, if the current
run needs to resolve conflicts (may be the same conflict, may be a
different conflict, depending on what bases are used for the current run
and the previous run).

Please do not break it.

```

## Ping Yin, 2008-04-30 17:38

Subject: Re: git-rebase and reflog
Message-ID: <46dff0320804301038l283544b9t8c9e0649fbced65e@mail.gmail.com>
URL: https://gitlist.dev/e/46dff0320804301038l283544b9t8c9e0649fbced65e%40mail.gmail.com
In-Reply-To: <7v7ief1c27.fsf@gitster.siamese.dyndns.org>

```
On Thu, May 1, 2008 at 1:34 AM, Junio C Hamano <gitster@pobox.com> wrote:
> "Ping Yin" <pkufranky@gmail.com> writes:
>
>
> > However, i still think the intemediate commits of git-rebase needn't
>  > go into HEAD's reflog because it's totally useless.
>
>  Actually I use it from time to time when I need to compare intermediate
>  steps of _previous_ run of the same rebase while rebasing, if the current
>  run needs to resolve conflicts (may be the same conflict, may be a
>  different conflict, depending on what bases are used for the current run
>  and the previous run).

OK, i'm wrong, it is a useful case.



-- 
Ping Yin

```
