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

git log --graph with a sort of local revision number

From
UBUwe Brauer <oub@mat.ucm.es>
Date
Aug 15, 2019, 08:35 UTC
Message-ID
<87blwq7rn5.fsf@mat.ucm.es>
Hi

I am an occasionally git user and am very used to local revision numbers mercurial provides in its log command. I don't want to start the discussion whether local revision numbers are useful or not, nor whether mercurial is better or not.

I only want to know whether there is any possibility to have this number in the log.

I have seen 
https://stackoverflow.com/questions/4120001/what-is-the-git-equivalent-for-revision-number

That git rev-list --count HEAD

But I would like to have it in the 
 git log --graph --decorate
So something like this 
o  changeset:   5:d3ae13222c31
|  tag:         tip
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Wed Aug 14 14:23:29 2019 +0200
|  summary:     Six
|
o  changeset:   4:64a3eee07e93
|  user:        Uwe Brauer <oub@mat.ucm.es>
|  date:        Wed Aug 14 14:23:28 2019 +0200
|  summary:     Fifth
Anybody know who to achieve it?
I presume 
 git checkout revnumber
Would not work?
I know that 
 git checkout HEAD~somenumber
Works
Uwe Brauer 
Next: Rafael Ascensão
Message 1 of 13 in “git log --graph with a sort of local revision number”
  1. Uwe BrauerAug 15, 2019
  2. Rafael AscensãoAug 18, 2019
  3. Uwe BrauerAug 18, 2019
  4. Uwe BrauerAug 18, 2019
  5. [SOLVED] (was: git log --graph with a sort of local revision number)Uwe Brauer, Aug 18, 2019
  6. [problem with name-rev] (was: git log --graph with a sort of local revision number)Uwe Brauer, Aug 20, 2019
  7. SZEDER GáborAug 20, 2019
  8. Rafael AscensãoAug 20, 2019
  9. Junio C HamanoAug 20, 2019
  10. Uwe BrauerAug 20, 2019
  11. Phil HordAug 20, 2019
  12. Uwe BrauerAug 21, 2019
  13. Uwe BrauerAug 21, 2019

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.