首先找到 .gitconfig 文件
打开 .gitconfig 文件,直接在后面添加如下内容:
[alias]
st = status
ci = commit
cim = commit -m
co = checkout
cob = checkout -b
b = branch
a = add
r = remote
m = merge
pl = pull
ps = push
di = diff
l = log
mom = merge origin master
cfg = config
sb = show-branch
gl = log --graph --pretty=format:'%h%Cred%d%Creset @%Cgreen%an%Creset %s [%ar]' --abbrev-commit --color --decorate --date-order--date-order
dc = diff --color --cached