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

How to query the version of a file?

From
EHEdmond Halley <halleyinvent@gmail.com>
Date
Aug 25, 2010, 06:33 UTC
Message-ID
<AANLkTi=upbiD5EBumxNxG0YvSRZN0mDfvu7LeU0y0Zpw@mail.gmail.com>
Hi,

I have a standalone repository. File a.cpp has 3 versions. For example, I checked out version2(HEAD^).

> git checkout HEAD^ a.cpp

After a few days, I forget which version I have checked out. Is there a git command that can query which version is checked out? "git status" will show there is "changes to be committed", but with no the version information. Thank you!

Best regards, Halley

Next: Todd A. Jacobs
Message 1 of 5 in “How to query the version of a file?”
  1. Edmond HalleyAug 25, 2010
  2. Todd A. JacobsAug 25, 2010
  3. sandy2010Sep 28, 2010
  4. Michael J GruberSep 28, 2010
  5. Pascal ObrySep 28, 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.