Skip to content

Instantly share code, notes, and snippets.

@balajeerc
Last active October 5, 2018 06:51
Show Gist options
  • Save balajeerc/0ab9cb22df522a0fff3dc7a4aca94e7b to your computer and use it in GitHub Desktop.
Save balajeerc/0ab9cb22df522a0fff3dc7a4aca94e7b to your computer and use it in GitHub Desktop.
My Git Cheatsheet

My Git Cheatsheet

Show a diff of the last change made in a file in any commit

git log -p -n 1 <filename>

Show changes since last commit

git diff # for changes werent't added to index

git diff --cached # for changes both added and not added to index

git diff HEAD # for changes between current state and previous commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment