git 添加别名的方式,打开~/.gitconfig文件在其末尾添加: 在命令行输入以下命令: 1、进到根目录 cd ~/ 2、打开.gitconfig, vi ~/.gitconfig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
a = add b = branch c = commit d = diff l = 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 st = status