Created
December 30, 2013 03:28
-
-
Save youngshook/8177455 to your computer and use it in GitHub Desktop.
Useful set of 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
[sendemail] | |
chainreplyto = false | |
smtpserver = /usr/bin/msmtp | |
[color] | |
ui = true | |
[core] | |
editor = vim | |
excludesfile = ${HOME}/.gitignore_global | |
[merge] | |
tool = vimdiff | |
[alias] | |
br = branch | |
ci = commit | |
st = status | |
co = checkout | |
cr = clone --recursive | |
unstage = reset HEAD -- | |
uncommit = reset --soft HEAD~ | |
amend = commit --amend | |
who = shortlog -n -s --no-merges | |
g = grep -n --color -E | |
cp = cherry-pick -x | |
nb = checkout -b | |
# 'git add -u' handles deleted files, but not new files | |
# 'git add .' handles any current and new files, but not deleted | |
# 'git addall' now handles all changes | |
addall = !sh -c 'git add . && git add -u' | |
# Handy shortcuts for rebasing | |
rb = rebase | |
rc = rebase --continue | |
rs = rebase --skip | |
ra = rebase --abort | |
# Log | |
last = log -1 HEAD | |
l = log --oneline --decorate -12 --color | |
ll = log --oneline --decorate --color | |
lc = log --graph --color | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
# Submodule | |
sb = submodule | |
sbi = submodule init | |
sba = submodule add | |
sbu = submodule update | |
sbp = submodule foreach git pull | |
sbc = submodule foreach git co master | |
sbr = submodule update --init --recursive | |
[mergetool] | |
keepBackup = true | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
[push] | |
default = simple | |
[http] | |
postBuffer = 524288000 | |
[branch] | |
autosetuprebase = always | |
[help] | |
autocorrect = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment