git alias 等 gitconfig的一些配置

[alias]
  logs = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  lg = log -p

如果想要把 rebase 當做 git pull 的預設值,可以在專案的 .git/config 加上


[branch "master"]
  remote = origin
  merge = refs/heads/master
  rebase = true

也可以直接加到 ~/.gitconfig 讓所有的 tracked branches 都自動套用這個設定:


[branch]  
  autosetuprebase = always

编辑 .gitconfig 文件

你可能感兴趣的:(git alias 等 gitconfig的一些配置)