Jan Hudec
Jan Hudec

Reputation: 76236

Find which revision deleted a file in git

You can find where a file was modified using

git log -- pathspec

but that stops on revision that does not contain any files matching pathspec. Well, the file in question was removed, so the last revision does not contain it, so it stops immediately. So how do I find the revision where the file was deleted?

Upvotes: 1

Views: 83

Answers (1)

Jan Hudec
Jan Hudec

Reputation: 76236

Using

git log --full-history -- pathspec

to prevent the undesired history simplification.

Upvotes: 1

Related Questions