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

'git log' numbering commits?

From
DWDaniel Wagner <wagi@monom.org>
Date
Apr 12, 2012, 07:54 UTC
Message-ID
<4F868A24.9090004@monom.org>
Hi,

I have a stupid question I could not answer myself when reading the excellent documentation.

My workflow involves a lot of "git rebase -i". For figuring out which commit id to use I do first a 'git log --oneline'. Then I do copy past the id to the 'git rebase -i'. The reason why I don't use relative id such as HEAD~4, because I keep miscounting the commits.

So my question is there a magic option to have git log to enumerate the commits, e.g.

1: 2fcd2b3 network: Remove unused function 2: b376b2a session: Fix introspection for Change() 3: 15c9cd0 wifi: Refactor desctruction of network object 4: a9c699f network: Remove device pointer in network_remove() [...]

cheers, daniel

Next: Jeff King
Message 1 of 4 in “'git log' numbering commits?”
  1. Daniel WagnerApr 12, 2012
  2. Jeff KingApr 12, 2012
  3. Daniel WagnerApr 12, 2012
  4. Philippe VaucherApr 12, 2012

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.