Created
June 25, 2015 14:18
-
-
Save elkelk/58f3618847274f1f3623 to your computer and use it in GitHub Desktop.
Sensible Git Config
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
[user] | |
name = your_git_name | |
email = your.email@gmail.com | |
[credential] | |
helper = osxkeychain | |
[core] | |
editor = vim | |
[hub] | |
protocol = https | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
[alias] | |
st = "status -sb" | |
co = "checkout" | |
lg = "!git log -20 --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[37;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | cat" | |
lglong = "!git log -50 --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[37;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | cat" | |
wip = ! git add -A && git commit -m "wip" | |
lgdiff = "!f() { git log --left-right --graph --cherry-pick --oneline $1; }; f" | |
[push] | |
default = current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment