[alias] st = status -sb
co = checkout
br = branch
mg = merge
ci = commit
ds = diff --staged
dt = difftool
mt = mergetool
last = log -1 HEAD
latest = for-each-ref --sort=-committerdate --format="%(committername)@%(refname:short) [%(committerdate:short)] %(contents)" ls = log --pretty=format:"%C(yellow)%h %C(blue)%ad %C(red)%d %C(reset)%s %C(green)[%cn]" --decorate --date=short hist = log --pretty=format:"%C(yellow)%h %C(red)%d %C(reset)%s %C(green)[%an] %C(blue)%ad" --topo-order --graph --date=short type = cat-file -t dump = cat-file -p
git别名可以加到.gitconfig文件里,或是使用命令(译者注:本质就是改写.gitconfig命令)来增加(括号部分替换为别名和对应的命令): git config --global alias.(name) "(command)"