git 配置

vi ~/.gitconfig

安装开源命令行对比工具 delta: https://github.com/dandavison/delta

详细设置delta:https://www.5axxw.com/wiki/content/xrx4vf

bash 复制代码
[user]
	name = xx
	email = xx@xxxx.com

[core]
	attributesfile = ~/.gitattributes
	pager = delta
	quotepath = false
	
[credential]
	helper = cache --timeout=3600

[color]
	diff = auto
	status = auto
	branch = auto
	interactive = auto
	ui = true
	pager = true

[interactive]
	diffFilter = delta --color-only

[pull]
	rebase = true
	
[diff]
	colorMoved = default
	
[diff "image"]
	command = compare $2 $1 png:- | montage -geometry +4+4 $2 - $1 png:- | display -title \"$1\" -

[merge]
	conflictstyle = diff3
	ff = no
	commit = no

[delta]
	side-by-side = true
	line-numbers-left-format = ""
	line-numbers-right-format = "│ "
	syntax-theme = Nord
	navigate = true
	light = false

[clone]
	#recurseSubmodules = true

[alias]
	st = status
	br = branch
	lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
	last = log -1
相关推荐
悟空瞎说13 小时前
# Git 交互式变基:优雅整理提交历史,告别杂乱 PR 记录
前端·git
身如柳絮随风扬13 小时前
Git 核心操作:rebase 与 merge 的区别,以及分支管理最佳实践
大数据·git
cccyi713 小时前
Git本地和远程邮箱一致,上传也有贡献显示,但是没有绿点或绿点延迟显示
git
暗暗别做白日梦16 小时前
Git 提交信息命名规范:feat、fix、refactor
git
憧憬成为java架构高手的小白18 小时前
git(基于b站狂神说学习)【未完结】
git·学习
likerhood18 小时前
Git 提交与推送常见报错处理笔记
笔记·git
chen_22719 小时前
KZPROJ Git Diff AI 审查工具
git·ai·claude·kanzi
向日的葵00619 小时前
大模型技术之git(第八章)
git
xuhaoyu_cpp_java21 小时前
Git学习(一)
经验分享·笔记·git·学习
Mr YiRan21 小时前
Android构建优化:基于Git Diff+TaskGraph
android·git·elasticsearch