Last active
August 29, 2015 14:00
-
-
Save bholt/8c9a42f9b5aed6107944 to your computer and use it in GitHub Desktop.
Git Config Snippet
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
[color] | |
# color whenever it's going to a terminal | |
ui = auto | |
[core] | |
# global excludes go here | |
excludesfile = ~/.gitignore_global | |
ignorecase = false | |
autocrlf = input | |
# wrap text correctly when paging (this may be OSX-specific) | |
pager = less -+$LESS -FRX | |
[alias] | |
# does add/remove for files already in git | |
u = add --update | |
# cuz who has the time to type all that? | |
co = checkout | |
# better diff | |
d = diff --color-words='[A-z0-9_]+|[^[:space:]]' --unified=1 --ignore-all-space | |
# show cached changes (word diff) | |
dc = !git d --cached | |
# log: show patch for each commit (word diff) | |
lp = log --graph --color-words='[A-z0-9_]+|[^[:space:]]+' --unified=0 --decorate=short --patience | |
# log: show changed files | |
lg = log --graph --stat --decorate=short | |
# show changes in a commit (word diff) | |
sp = show --color-words='[A-z0-9_]+|[^[:space:]]+' --unified=0 --decorate=short --patience | |
# view commit graph, all branches and merges, one line per commit | |
gr = log --graph --pretty=format:'%Cblue%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cN, %cr)%Creset' --abbrev-commit --date=relative --branches=* --remotes=* | |
# Show short status with current branch name | |
s="!f() { br=$(git rev-parse --abbrev-ref HEAD) && echo \"(${br})\" && git status -s; }; f" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment