Saturday, November 20, 2021

find a deleted file in a git repository

https://stackoverflow.com/questions/7203515/how-to-find-a-deleted-file-in-the-project-commit-history

git log --all --full-history -- "**/thefile.*"

This outputs a list of commits which reference the deleted file.

commit d1c --snip hash -- 51ae
Author: Name <email>
Date:   Sat Mar 6 13:05:11 2021 +0000

    validate password

commit 161--snip hash --1cf04
Author: Name <email>
Date:   Wed Mar 3 03:22:55 2021 +0000

    Changes for postgresql DB

and so on. 


No comments:

Post a Comment