* git rebase -i and the reflog
@ 2010-02-10 22:19 Sverre Rabbelier
2010-02-10 22:23 ` Junio C Hamano
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sverre Rabbelier @ 2010-02-10 22:19 UTC (permalink / raw)
To: Git List
Heya,
I use "git rebase -i" a lot, and as a result the output from 'git log
-g' and 'git reflog' is a tad messy. That is, it's (afaik) not
possible to check that after my rebasing did not mess things up using
something like 'git diff HEAD@{1}'. I could of course tag the old head
or something, but that's not the only problem, due to the clutter it's
hard to find genuine commits. What I want is a way to see HEAD's
movement _excluding_ any rebase activity. So if I change history from
A-o-B-C to A-o-B'-C', I want to see C and C' in the reflog, but not
B', since B' is often actually identical to B, the only reason that it
changed is that I did 'git rebase -i' on some far-back commit.
Is there an existing solution to this?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git rebase -i and the reflog
2010-02-10 22:19 git rebase -i and the reflog Sverre Rabbelier
@ 2010-02-10 22:23 ` Junio C Hamano
2010-02-10 22:26 ` Sverre Rabbelier
2010-02-11 3:35 ` Nicolas Pitre
2010-02-11 7:29 ` Patrick Sudowe
2 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2010-02-10 22:23 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: Git List
Sverre Rabbelier <srabbelier@gmail.com> writes:
> I use "git rebase -i" a lot, and as a result the output from 'git log
> -g' and 'git reflog' is a tad messy. That is, it's (afaik) not
> possible to check that after my rebasing did not mess things up using
> something like 'git diff HEAD@{1}'.
Yes and no. I too suffer from it but only when I rebase a detached HEAD
state. If you rebased a topic, "git diff topic@{1}" (or "git diff @{1}")
would give you what you want.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git rebase -i and the reflog
2010-02-10 22:23 ` Junio C Hamano
@ 2010-02-10 22:26 ` Sverre Rabbelier
0 siblings, 0 replies; 5+ messages in thread
From: Sverre Rabbelier @ 2010-02-10 22:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git List
Heya,
On Wed, Feb 10, 2010 at 23:23, Junio C Hamano <gitster@pobox.com> wrote:
> Yes and no. I too suffer from it but only when I rebase a detached HEAD
> state. If you rebased a topic, "git diff topic@{1}" (or "git diff @{1}")
> would give you what you want.
Ah, mhh, so the reason I'm seeing this cruft is that I'm using 'HEAD@'
instead of 'topic@'. It only makes sense that HEAD's reflog includes
every commit, and a topic's reflog includes just that topics. Thanks
for the quick reply, this'll make my life a bunch easier :).
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git rebase -i and the reflog
2010-02-10 22:19 git rebase -i and the reflog Sverre Rabbelier
2010-02-10 22:23 ` Junio C Hamano
@ 2010-02-11 3:35 ` Nicolas Pitre
2010-02-11 7:29 ` Patrick Sudowe
2 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pitre @ 2010-02-11 3:35 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: Git List
On Wed, 10 Feb 2010, Sverre Rabbelier wrote:
> Heya,
>
> I use "git rebase -i" a lot, and as a result the output from 'git log
> -g' and 'git reflog' is a tad messy. That is, it's (afaik) not
> possible to check that after my rebasing did not mess things up using
> something like 'git diff HEAD@{1}'. I could of course tag the old head
> or something, but that's not the only problem, due to the clutter it's
> hard to find genuine commits. What I want is a way to see HEAD's
> movement _excluding_ any rebase activity. So if I change history from
> A-o-B-C to A-o-B'-C', I want to see C and C' in the reflog, but not
> B', since B' is often actually identical to B, the only reason that it
> changed is that I did 'git rebase -i' on some far-back commit.
>
> Is there an existing solution to this?
What about looking at the reflog for the branch you're on instead of
HEAD? In the reflog space they're different.
Nicolas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git rebase -i and the reflog
2010-02-10 22:19 git rebase -i and the reflog Sverre Rabbelier
2010-02-10 22:23 ` Junio C Hamano
2010-02-11 3:35 ` Nicolas Pitre
@ 2010-02-11 7:29 ` Patrick Sudowe
2 siblings, 0 replies; 5+ messages in thread
From: Patrick Sudowe @ 2010-02-11 7:29 UTC (permalink / raw)
To: git
On Wednesday 2/10 2/10 11:19 PM, Sverre Rabbelier wrote:
> Heya,
>
> I use "git rebase -i" a lot, and as a result the output from 'git log
> -g' and 'git reflog' is a tad messy. That is, it's (afaik) not
> possible to check that after my rebasing did not mess things up using
> something like 'git diff HEAD@{1}'. I could of course tag the old head
> or something, but that's not the only problem, due to the clutter it's
> hard to find genuine commits. What I want is a way to see HEAD's
> movement _excluding_ any rebase activity. So if I change history from
> A-o-B-C to A-o-B'-C', I want to see C and C' in the reflog, but not
> B', since B' is often actually identical to B, the only reason that it
> changed is that I did 'git rebase -i' on some far-back commit.
>
> Is there an existing solution to this?
>
Since nobody else mentioned it on the list.
You could also use ORIG_HEAD.
merge, rebase and am (maybe others?) record the position of HEAD to
ORIG_HEAD before their operation.
So to check for the differences directly after one of these commands
a diff between HEAD and ORIG_HEAD should do.
I really liked the shortcut of ORIG_HEAD when I found out about it
just a couple days ago.
-Patrick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-11 7:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 22:19 git rebase -i and the reflog Sverre Rabbelier
2010-02-10 22:23 ` Junio C Hamano
2010-02-10 22:26 ` Sverre Rabbelier
2010-02-11 3:35 ` Nicolas Pitre
2010-02-11 7:29 ` Patrick Sudowe
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).