Created
July 4, 2013 01:33
-
-
Save devonmather/5924267 to your computer and use it in GitHub Desktop.
Various Git Snippets
This file contains 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
$ git config --global alias.unstage 'reset HEAD --' | |
This makes the following two commands equivalent: | |
$ git unstage fileA | |
$ git reset HEAD fileA | |
This seems a bit clearer. It’s also common to add a last command, like this: | |
$ git config --global alias.last 'log -1 HEAD' | |
This way, you can see the last commit easily: | |
$ git last | |
commit 66938dae3329c7aebe598c2246a8e6af90d04646 | |
Author: Josh Goebel <dreamer3@example.com> | |
Date: Tue Aug 26 19:48:51 2008 +0800 | |
test for current head | |
Signed-off-by: Scott Chacon <schacon@example.com> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment