.gitconfig配置文件
git的配置文件分为三个层级:
1.对所有用户,位于/etc/gitconfig
2.对于当前用户,位于~/.gitconfig
3.对于该git仓,位于.git/config
建议配置当前用户的.gitconfig文件
分享一下作者的配置文件:
1 [alias] 2 amend = commit --amend 3 amendf = commit --amend --no-edit 4 br = branch 5 ct = commit 6 co = checkout 7 cp = cherry-pick 8 df = diff 9 ds = diff --staged 10 l = log 11 lg = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative 12 lp = log --pretty=oneline 13 sa = stash apply 14 sh = show 15 ss = stash save 16 st = status 17 18 [color] 19 ui = auto 20 [color "branch"] 21 current = yellow reverse 22 local = yellow 23 remote = green 24 [color "status"] 25 added = yellow 26 changed = green 27 untracked = cyan 28 [color "diff"] 29 meta = yellow 30 frag = magenta bold 31 commit = yellow bold 32 old = red bold 33 new = green bold 34 whitespace = red reverse 35 [color "diff-highlight"] 36 oldNormal = red bold 37 oldHighlight = red bold 52 38 newNormal = green bold 39 newHighlight = green bold 22 40 41 [user] 42 email = alvin@qq.com 43 name = alvin
作者:Alvin2012
posted on 2019-06-17 09:31 Alvin2012 阅读(4209) 评论(0) 编辑 收藏 举报
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步