Skip to content

Instantly share code, notes, and snippets.

@toddlers
Created July 12, 2013 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddlers/5983816 to your computer and use it in GitHub Desktop.
Save toddlers/5983816 to your computer and use it in GitHub Desktop.
You can use the — option in git log to see the commit history for a file, even if you have deleted the file.
# see the changes for a file, even if it was deleted
git log -- [file_path]
# limit the output to only the last commit that touched the file
git log -1 -- [file_path]
# include some statistics, eg. how many files were deleted
git log -1 --stat -- [file_path]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment