Created
April 9, 2012 22:50
-
-
Save filipechagas/2347164 to your computer and use it in GitHub Desktop.
Git tips
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
#source: http://mislav.uniqpath.com/2010/07/git-tips/ | |
Show branches, tags in git log | |
$ git log --oneline --decorate | |
7466000 (HEAD, mislav/master, mislav) fix test that fails if current dir is not "hub" | |
494a414 fix cherry-pick of a commit URL | |
4277848 (origin/master, origin/HEAD, master) whoops | |
d270fae bugfix: git init -g | |
9307af3 test deps | |
8ccc17e http://github.com/defunkt/hub/contributors | |
64bb19c bugfix: variable name | |
546726a dont need you | |
3a8d7af (tag: v1.3.1) v1.3.1 | |
197f429 (tag: v1.3.0) v1.3.0 | |
a1e1a50 not important | |
3c6af16 magic `cherry-pick` supports GitHub commit URLs and "user@sha" notation | |
Diff by highlighting inline word changes instead of whole lines | |
$ git diff --word-diff | |
# Returns a Boolean. | |
def command?(name) | |
`type -t [-#{command}`-]{+#{name}`+} | |
$?.success? | |
end | |
Short status output | |
$ git status -sb | |
## thibaudgg...thibaudgg/master [ahead 1, behind 2] | |
M ext/fsevent/fsevent_watch.c | |
?? Makefile | |
?? SCEvents/ | |
?? bin/fsevent_watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment