Skip to content

Instantly share code, notes, and snippets.

@sheronw
Created September 25, 2020 01: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 sheronw/b358a2806594cf2ab7fd420e569907f3 to your computer and use it in GitHub Desktop.
Save sheronw/b358a2806594cf2ab7fd420e569907f3 to your computer and use it in GitHub Desktop.
compare between different state #git
# 1. committed
# 2. staged but not comitted
# 3. not added to stage
# compare between 2 & 3
git diff [file]
# compare between 1 & 2
git diff [file] --cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment