git 配置 命令行别名
程序员文章站
2024-02-17 13:51:22
...
.gitconfig 位置
linux/mac
vim ~/.gitconfig
windows
我的文档下面
.gitconfig 文件内部加入如下配置;
[alias]
br = branch
ci = commit
cl = clone
co = checkout
cp = cherry-pick
cfg = clone
df = diff
fh = fetch
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
mg = merge
pl = pull
plr = pull --rebase
rb = rebase
ph = push
rmt = remote
rst = reset
sh = stash
st = status
sts = status -s
sbm = submodule
sw = show
swf = "show --name-status"
delb = "push origin --delete"
delt = "push origin :"
mb = merge-base
然后可以用git st 代替 git status了。
其他同理
上一篇: Machine Learning
下一篇: Shuffling Machine