threads / discuss / 19136

finding the commit that deleted a file

Subject: finding the commit that deleted a file

## tl;dr

4 messages between Apr 30, 2009 and Apr 30, 2009.

replies: 3people: 3as markdown or json

Christoph Duelli· Apr 30, 2009, 07:31 UTC · lore

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?
(And then, with the obtained SHA1, use gitk or some such tool to inspect 
  this file.)
Thank you.
Best regards
-- 
Christoph Duelli
Alex Riesen· Apr 30, 2009, 07:41 UTC · re: Christoph Duelli · lore

Re: finding the commit that deleted a file

2009/4/30 Christoph Duelli <duelli@melosgmbh.de>:
Show 8 quoted lines
> 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?
> (And then, with the obtained SHA1, use gitk or some such tool to inspect
>  this file.)
"gitk -- the/name/of/deleted/file" :)
Baz· Apr 30, 2009, 08:25 UTC · re: Alex Riesen · lore

Re: finding the commit that deleted a file

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
>
Christoph Duelli· Apr 30, 2009, 08:33 UTC · re: Baz · lore

Re: finding the commit that deleted a file

Baz schrieb:
Show 17 quoted lines
> 2009/4/30 Alex Riesen <raa.lkml@gmail.com>:
>> 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
> 
>>> (And then, with the obtained SHA1, use gitk or some such tool to inspect
>>>  this file.)
>> "gitk -- the/name/of/deleted/file" :)
>> --

Great, thanks. Both of these work!

Bes regards
-- 
Christoph Duelli

← back to recent threads