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
相关推荐
Geek-Chow9 小时前
Git 标签与发布流程:轻量标签、附注标签与签名标签
git·tags
wear工程师9 小时前
Git 冲突怎么解决:别只删标记,先看懂暂存区的 1、2、3 阶段
git
村雨遥9 小时前
覆盖提交不等于删除,这才是彻底清除 Git 历史的正确姿势
git·github
淮北49410 小时前
ubuntu22 默认输入法调整频率
运维·服务器·git·ubuntu·elasticsearch
dunge202611 小时前
2026 ChatGPT Plus / Pro + Codex 实战:从 0 搭一套 AI 编程项目模板,AGENTS.md + Git + 测试一次配好
人工智能·git·chatgpt
福如意如我心意1 天前
git清除仓库敏感文件并同步至远端的操作
git
Brilliantwxx1 天前
【Linux】 开发|Git 版本控制与 gdb/cgdb 调试
linux·笔记·git
.Hypocritical.2 天前
Git 全套实操|配置 /.gitignore/ 分支合并 / 冲突解决 /git stash 完整教程
git
来日方长。。。。long2 天前
Hermes Agent橙皮书共读|第三篇:保姆级实战部署|本地/VPS从零搭建Hermes
ide·git·hermes
其实防守也摸鱼2 天前
VS Code Git 工作树:解锁多分支并行开发新体验
数据库·git·安全·oracle·架构·自动化