1

If I have a file under git e.g. an image png that was removed from the repository, how can I find which commit removed it?
Also I would like to search even if I am not 100% about the file name e.g. if it was some_image.png or some_image_icon.png for instance

1 Answer 1

3

Try this

git log --diff-filter=D -- *some_image_*.png

Or (if you know the path):

git log --diff-filter=D -- path/to/file/some_image_*.png
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.