Skip to content

Instantly share code, notes, and snippets.

@tobyqin
Created January 7, 2017 08:07
Show Gist options
  • Save tobyqin/5ca53bc9611de9d2d50b2c16ce48b5da to your computer and use it in GitHub Desktop.
Save tobyqin/5ca53bc9611de9d2d50b2c16ce48b5da to your computer and use it in GitHub Desktop.
Personal git config
[user]
name = Toby Qin
email = toby.qin@live.com
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(bold magenta)%d%Creset %s %Cgreen(%cr)%C(bold cyan)<%an>%Creset' --abbrev-commit
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%C(cyan)\\ [%cn]" --decorate --date=short -20
ci = commit --verbose
ca = commit -a --verbose
cm = commit -m
m = commit --amend --verbose
c = commit --verbose
cam = commit -a -m
ac = !git add . && git commit -am
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
st = status
co = checkout
cob = checkout -b
br = branch
bra = branch -a
aa = add -A .
la = "!git config -l | grep alias | cut -c 7-"
pl = pull -p
ps = push
pa = push --all -u
undo-commit = reset --soft HEAD~1
undo = reset --hard
sb = submodule
sbi = submodule init
sbu = submodule update --remote
sbp = submodule foreach git pull
sbc = submodule foreach git co master
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
[push]
default = simple
[diff]
submodule = log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment