git缩写配置

git缩写的配置能够极大地方便我们代码的提交,下面是我的git缩写配置分享给大家

配置方法是在.gitconfig文件中添加别名

[alias]
  co = checkout
  ci = commit
  st = status
  sh = stash
  sa = stash apply
  sp = stash pop
  ap = add -p
  br = branch
  cp = checkout -p
  cv = commit -v
  dc = diff --cached
  d = diff
  pr = pull --rebase
  ps = push
  l = log --graph --pretty=format:'%C(yellow)%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --all
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all



你可能感兴趣的:(git)