Re: git rebase -i and the reflog
- From
- Patrick Sudowe <git@sudowe.net>
- Date
- Feb 11, 2010, 07:29 UTC
- Message-ID
- <4B73B1BD.7030606@sudowe.net>
- In-Reply-To
- <fabb9a1e1002101419x40844a42s21108aaa849430c1@mail.gmail.com>
On Wednesday 2/10 2/10 11:19 PM, Sverre Rabbelier wrote:
Show 15 quoted lines
> 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