gitconfig 文件用来配置 Git 工作环境:
- 系统级:/etc/gitconfig,对应
git config --system
- 用户级:~/.gitconfig,对应
git config --global
- 项目级:项目目录/.git/config,对应
git config
文件内容:
[user]
name = barwe
email = barwechin@163.com
[alias]
st = status
co = checkout
br = branch
ci = commit
pl = pull --rebase
ps = push
mg = merge --no-ff
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
[core]
autocrlf = input
ignorecase = false
quotepath = false
[push]
default = upstream
[credential]
helper = store
[pull]
rebase = true
评论区