From: Junio C Hamano Date: Mon, 07 Jul 2008 05:24:39 GMT Subject: Re: [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch Message-ID: <7vwsjy8dwo.fsf@gitster.siamese.dyndns.org> In-Reply-To: <803A3528-2451-4C5D-A48D-5E0C37B8E90E@silverinsanity.com> Brian Gernhardt writes: > 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/rebase If 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).