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

Re: Stepping through a single file's history

From
John Tapsell <johnflux@gmail.com>
Date
Jan 29, 2010, 01:58 UTC
Message-ID
<43d8ce651001281758x79965b5fn8760b69d4fe82a36@mail.gmail.com>
In-Reply-To
<5699F80A-4B27-4BAB-BEE8-5C48938A970B@flownet.com>
2010/1/29 Ron Garret <ron@flownet.com>:
> Hello,
>
> Is there an easy way to step through the history of a single file?  To be more specific:
...
> (The use case here is remembering that back in the day there was some useful code in this file that I want to retrieve, but not remembering exactly when it was deleted.  So I want to step back through this file's history and do diffs against HEAD.)
How about simply doing:
git log -p filename
and then you can search by pressing "/"  and then typing whatever you remember.
John
Previous: Ron GarretNext: John Tapsell
Message 2 of 4 in “Stepping through a single file's history”
  1. Ron GarretJan 29, 2010
  2. John TapsellJan 29, 2010
  3. John TapsellJan 29, 2010
  4. Pete HarlanJan 31, 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.