git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rebase -i and the reflog

From
Nicolas Pitre <nico@fluxnic.net>
Date
Feb 11, 2010, 03:35 UTC
Message-ID
<alpine.LFD.2.00.1002102234490.1681@xanadu.home>
In-Reply-To
<fabb9a1e1002101419x40844a42s21108aaa849430c1@mail.gmail.com>
On Wed, 10 Feb 2010, Sverre Rabbelier wrote:
Show 14 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?

What about looking at the reflog for the branch you're on instead of HEAD? In the reflog space they're different.

Nicolas
Previous: Sverre RabbelierNext: Patrick Sudowe
Message 4 of 5 in “git rebase -i and the reflog”
  1. Sverre RabbelierFeb 10, 2010
  2. Junio C HamanoFeb 10, 2010
  3. Sverre RabbelierFeb 10, 2010
  4. Nicolas PitreFeb 11, 2010
  5. Patrick SudoweFeb 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.