Git 设置别名

xiaoxiao2021-02-28  56

添加别名的方式:

linux: vim ~/.gitconfig ,末尾添加 Windows: 在用户目录下, .gitconfig 文件,末尾添加

添加内容:

[alias] a = add b = branch c = commit ci = commit d = diff st = status lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset | %C(bold)%an' --abbrev-commit --date=relative r = reset aa = add . ba = branch -a ca = commit -a cc = commit -a -m cl = clone cm = commit -m co = checkout cp = cherry-pick nb = checkout -b pl = pull ps = push origin master
转载请注明原文地址: https://www.6miu.com/read-1700092.html

最新回复(0)