Re: [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 7, 2008, 05:24 UTC
- Message-ID
- <7vwsjy8dwo.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <803A3528-2451-4C5D-A48D-5E0C37B8E90E@silverinsanity.com>
Brian Gernhardt <benji@silverinsanity.com> writes:
Show 12 quoted lines
> On Jul 7, 2008, at 12:43 AM, Junio C Hamano wrote:
>
>> Having said that, thanks to updates to git-rebase,
>> rebased_branch@{1} has
>> useful information these days, so I do not see much practical
>> upside, even
>> though I _will_ apply this patch, just for the sake of consistency.
>
> I've been running rebase a lot over the last few days, and my
> impression was that git-rebase adds an entry to ther eflog for each
> patch it runs over. While this has its uses, it makes HEAD@{1} not
> terribly useful after a "pull --rebase".Actually, I was not talking about HEAD@{1}. Check the reflog of the branch you rebased, i.e.
$ git checkout bg/rebase
$ git rebase master
$ git diff bg/rebase@{1} bg/rebaseIf you have two patches in bg/rebase, HEAD@{2} will be the updated master, HEAD@{1} will be the first patch on top of it, and HEAD will be the rebased tip. bg/rebase@{1} on the other hand is the tip of bg/rebase before you started rebasing (i.e. the result of "git checkout bg/rebase" above).