Skip to content

Instantly share code, notes, and snippets.

@rozgo
Created August 5, 2013 23:00
Show Gist options
  • Save rozgo/6160407 to your computer and use it in GitHub Desktop.
Save rozgo/6160407 to your computer and use it in GitHub Desktop.
given this:
$ git status
# On branch muzzle_flash
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Assets/Ammo/CannonBall.prefab
you can see if you've change in your working directory:
$ git diff Assets/Ammo/CannonBall.prefab
diff --git a/Assets/Ammo/CannonBall.prefab b/Assets/Ammo/CannonBall.prefab
index e7be47d..a36e5ea 100644
--- a/Assets/Ammo/CannonBall.prefab
+++ b/Assets/Ammo/CannonBall.prefab
while this produces nothing:
$ git diff Assets/Ammo/TankShell.prefab
this gives you commit number:
$ git log -n 1 Assets/Ammo/CannonBall.prefab
commit 0801fe0714e684a49fad139dad6bea8841200fab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment