Skip to contentSkip to conversation

finding the commit that deleted a file

DISCUSSION Christoph Duelli 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

Signature · 1 line
Christoph Duelli
#1 lore raw

2009/4/30 Christoph Duelli <[email protected]>:

Quoted 8 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" :)

#2 lore raw

2009/4/30 Alex Riesen <[email protected]>:

Quoted 7 lines

2009/4/30 Christoph Duelli <[email protected]>:

Quoted 6 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?

For completeness, the answer to the first part of the question:

git log --diff-filter=D -- the/name/of/deleted/file

Quoted 9 lines
Quoted 2 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 7 lines · Baz

2009/4/30 Alex Riesen <[email protected]>:

Quoted 6 lines

2009/4/30 Christoph Duelli <[email protected]>:

Quoted 5 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.

Quoted 10 lines
Quoted 1 line
Quoted 1 line

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

Quoted 4 lines
Quoted 2 lines

(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

Signature · 1 line
Christoph Duelli