mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-14 07:26:44 +00:00
feat: 完善 dotfiles 迁移功能和备份脚本
主要改进: - .gitignore: 添加敏感数据排除规则和备份文件排除 - .zshrc: 添加工作函数标记注释 (# ==== WORK:) - git/config: 模板化占位符 (YOUR_NAME, YOUR_EMAIL, YOUR_SSH_SIGNING_KEY) - setup.sh: 增强备份功能,支持完整配置导出 - Brewfile 备份 - Git 配置摘要(脱敏) - SSH 公钥备份 - 1Password 配置文档 - VSCode 扩展列表 - 备份报告生成 - README.md: 重写为完整项目文档 - CHECKLIST.md: 新机器配置检查清单 - MIGRATION_GUIDE.md: 个人备份说明文档 - QUICKSTART.md: 3-5 分钟快速开始指南 使用方式: ./setup.sh backup # 备份当前配置 ./setup.sh full-recover # 新机器完整恢复
This commit is contained in:
10
git/config
10
git/config
@@ -2,9 +2,10 @@
|
||||
defaultBranch = main
|
||||
|
||||
[user]
|
||||
name = Tony Tang
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF23DQtdH5PODF9fYUHr49I1J3lfKLAPk4LG54MVUTcg
|
||||
email = tonytang@lilith.com
|
||||
name = YOUR_NAME
|
||||
signingkey = YOUR_SSH_SIGNING_KEY
|
||||
email = YOUR_EMAIL
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
[core]
|
||||
editor = nvim
|
||||
excludesfile = /Users/lilithgames/.gitignore_global
|
||||
excludesfile = ~/.config/git/.gitignore
|
||||
|
||||
[pager]
|
||||
difftool = true
|
||||
@@ -49,6 +50,7 @@
|
||||
d = diff
|
||||
ds = diff --staged
|
||||
dc = diff --cached
|
||||
detect-placeholder-config = "!bash -lc 'CONFIG_FILE=$(git rev-parse --show-toplevel 2>/dev/null || echo \".\")/git/config; if [ -f \"$HOME/.dotfiles/git/config\" ]; then CONFIG_FILE=\"$HOME/.dotfiles/git/config\"; fi; if [ -f \"$CONFIG_FILE\" ]; then if grep -qE \"name\\s*=\\s*YOUR_NAME|email\\s*=\\s*YOUR_EMAIL|signingkey\\s*=\\s*YOUR_SSH_SIGNING_KEY\" \"$CONFIG_FILE\"; then echo \"[config] WARNING: Placeholder values detected in $CONFIG_FILE\"; echo \"[config] Please run: git config --file $CONFIG_FILE user.name 'Your Name'; git config --file $CONFIG_FILE user.email 'your@email.com'; git config --file $CONFIG_FILE user.signingkey 'your-ssh-key'\"; else echo \"[config] Git config looks good - no placeholders detected\"; fi; else echo \"[config] Config file not found: $CONFIG_FILE\"; fi'"
|
||||
|
||||
#[difftool "sourcetree"]
|
||||
# cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||
|
||||
Reference in New Issue
Block a user