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

Re: finding the commit that deleted a file

From
Baz <brian.ewins@gmail.com>
Date
Apr 30, 2009, 08:25 UTC
Message-ID
<2faad3050904300125r6cc6bc1fs6eb0e099dadcbf77@mail.gmail.com>
In-Reply-To
<81b0412b0904300041m2ac646cgdaffd4e2dadb9125@mail.gmail.com>
2009/4/30 Alex Riesen <raa.lkml@gmail.com>:
Show 7 quoted lines
> 2009/4/30 Christoph Duelli <duelli@melosgmbh.de>:
>> Following scenario:
>> Some file x was deleted (or renamed, but the --follow option does not
>> succeed) some 100 commits ago.
>> Now, I would like to check the 'lost' contents for some reason.
>>
>> Is it possible to find out when a given file (path) was deleted?
For completeness, the answer to the first part of the question:
git log --diff-filter=D -- the/name/of/deleted/file
Show 9 quoted lines
>> (And then, with the obtained SHA1, use gitk or some such tool to inspect
>>  this file.)
>
> "gitk -- the/name/of/deleted/file" :)
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Alex RiesenNext: Christoph Duelli
Message 3 of 4 in “finding the commit that deleted a file”
  1. Christoph DuelliApr 30, 2009
  2. Alex RiesenApr 30, 2009
  3. BazApr 30, 2009
  4. Christoph DuelliApr 30, 2009

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.