Last active
August 29, 2015 14:01
-
-
Save skeggse/254e11f9ca361b139ddd to your computer and use it in GitHub Desktop.
git being git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp$ mkdir gittest | |
/tmp$ cd gittest | |
/tmp/gittest$ git init | |
/tmp/gittest$ echo test > test | |
/tmp/gittest$ git add test | |
/tmp/gittest$ git commit -m test | |
/tmp/gittest$ git diff-index --quiet HEAD | |
/tmp/gittest$ echo $? | |
0 | |
/tmp/gittest$ echo "another test" >> test | |
/tmp/gittest$ git diff-index --quiet HEAD | |
/tmp/gittest$ echo $? | |
1 | |
/tmp/gittest$ echo test > test | |
/tmp/gittest$ git diff-index --quiet HEAD | |
/tmp/gittest$ echo $? | |
1 # what? | |
/tmp/gittest$ git status | |
/tmp/gittest$ git diff-index --quiet HEAD | |
/tmp/gittest$ echo $? | |
0 # expected... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment