Skip to content

Instantly share code, notes, and snippets.

@guillermoroblesjr
Created June 8, 2015 17:36
Show Gist options
  • Save guillermoroblesjr/0cee829b60708eb86ae8 to your computer and use it in GitHub Desktop.
Save guillermoroblesjr/0cee829b60708eb86ae8 to your computer and use it in GitHub Desktop.
Using git diff to view changes on a file with line numbers
# find and copy the: file name, hash of change
git whatchanged
# show the diff
# e.g. git diff ee11453 src/js/my-module.js
git diff <hash> <path/filename>
# when you see this: @@ -26,31 +26,31 @@
# "-26" is the line number,
# "31" is the number of lines changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment