Skip to content

Instantly share code, notes, and snippets.

@iamlux
Forked from praslnx8/Git Tools
Last active September 18, 2017 11:16
Show Gist options
  • Save iamlux/d015ae89e424f1d9ff3f7ee991092dc7 to your computer and use it in GitHub Desktop.
Save iamlux/d015ae89e424f1d9ff3f7ee991092dc7 to your computer and use it in GitHub Desktop.
This is useful command suppose if u missed file now u want to track the commits where the file was modified
git log --follow -p -- file
If you do not know the exact path you may use
git log --all --full-history -- **/thefile.*
If you know the path the file was at, you can do this:
git log --all --full-history -- <path-to-file>
or any other revision by identifier. Or use
gitk
Source: https://stackoverflow.com/questions/7203515/git-how-to-search-for-a-deleted-file-in-the-project-commit-history
In my case
git log --follow -p -- public/assets/images/photos/userprofile.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment