threads / discuss / 13334

git-rebase and reflog

Subject: git-rebase and reflog

## tl;dr

8 messages between Apr 30, 2008 and Apr 30, 2008.

replies: 7people: 5as markdown or json

Ping Yin· Apr 30, 2008, 16:04 UTC · lore

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· Apr 30, 2008, 16:37 UTC · re: Ping Yin · lore

Re: git-rebase and reflog

"Ping Yin" <pkufranky@gmail.com> writes:
Show 5 quoted lines
> 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· Apr 30, 2008, 16:56 UTC · re: Jakub Narebski · lore

Re: git-rebase and reflog

On Thu, May 1, 2008 at 12:37 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 14 quoted lines
>
> "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· Apr 30, 2008, 17:05 UTC · re: Ping Yin · lore

Re: git-rebase and reflog

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· Apr 30, 2008, 17:13 UTC · re: Brandon Casey · lore

Re: git-rebase and reflog

On Thu, May 1, 2008 at 1:05 AM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
Show 16 quoted lines
> 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· Apr 30, 2008, 17:22 UTC · re: Ping Yin · lore

Re: git-rebase and reflog

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· Apr 30, 2008, 17:34 UTC · re: Ping Yin · lore

Re: git-rebase and reflog

"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· Apr 30, 2008, 17:38 UTC · re: Junio C Hamano · lore

Re: git-rebase and reflog

On Thu, May 1, 2008 at 1:34 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> "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

← back to recent threads