Skip to content

Instantly share code, notes, and snippets.

@benzap
Last active August 29, 2015 14:16
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 benzap/5ac3a1e9b275f5cc15a8 to your computer and use it in GitHub Desktop.
Save benzap/5ac3a1e9b275f5cc15a8 to your computer and use it in GitHub Desktop.
compare the hashes between two files in two branches
git diff {git ls-tree master ./blank.htm | cut -f1 | cut -d ' ' -f3} {git ls-tree feature-nyc/IGM-296 ./blank.htm | cut -f1 | cut -d ' ' -f3}
@benzap
Copy link
Author

benzap commented Feb 26, 2015

git diff {git ls-tree master ./blank.htm | cut -f1 | cut -d ' ' -f3} {git ls-tree feature-nyc/IGM-296 ./blank.htm | cut -f1 | cut -d ' ' -f3}
diff --git a/5b1b16d1f4f7ca9f0b3720819a0eae509838eae8 b/8c7fe21114be50b7f92ef014b8ff6660b1500a95
index 5b1b16d..8c7fe21 100644
--- a/5b1b16d1f4f7ca9f0b3720819a0eae509838eae8
+++ b/8c7fe21114be50b7f92ef014b8ff6660b1500a95
@@ -1,2 +1,2 @@
-<html>
+<html>
 </html>
\ No newline at end of file

@benzap
Copy link
Author

benzap commented Feb 26, 2015

cat blank.htm 
<html>
</html>$ git branch
* feature-nyc/IGM-296
  feature/IGM-253
  master
  master-nyc
$ git checkout master -- blank.htm 
$ cat blank.htm 
<html>
</html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment