# dotfiles **Repository Path**: MSshuai/dotfiles ## Basic Information - **Project Name**: dotfiles - **Description**: 全局配置仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-18 - **Last Updated**: 2026-03-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Dotfiles - 个人配置仓库 存放个人开发环境配置文件,方便多设备同步。 ## 文件说明 | 文件 | 说明 | |------|------| | `.gitignore_global` | Git 全局忽略配置 | | `git-config.ps1` | 一键配置脚本 | ## 使用场景说明 > **当前电脑无需任何操作**,全局配置已生效,新建任何仓库都会自动读取。 > 本仓库仅用于**换电脑时快速恢复配置**。 ## 换电脑时使用(一次性操作) ### 方式一:一键配置(推荐) ```powershell # 1. 克隆仓库 git clone https://gitee.com/MSshuai/dotfiles.git # 2. 进入目录执行脚本(自动完成复制+配置+验证) cd dotfiles .\git-config.ps1 ``` ### 方式二:手动配置 ```powershell # 1. 克隆仓库 git clone https://gitee.com/MSshuai/dotfiles.git # 2. 复制全局配置到用户目录 Copy-Item "dotfiles\.gitignore_global" "$env:USERPROFILE\.gitignore_global" # 3. 配置 Git 指向全局文件 git config --global core.excludesfile "$env:USERPROFILE\.gitignore_global" ``` ## 验证配置 ```bash git config --global core.excludesfile ``` 预期输出:`C:\Users\你的用户名\.gitignore_global` ## 配置内容 全局 `.gitignore` 包含以下忽略规则: - **系统文件**: `.DS_Store`, `Thumbs.db` - **Node.js**: `node_modules/`, `npm-debug.log`, `yarn.lock` - **IDE**: `.idea/`, `.vscode/`, `*.iml` - **构建输出**: `/dist`, `/build`, `/target` - **环境变量**: `.env.local`, `.env.*` - **日志**: `logs/`, `*.log` - **Vue/Vite**: `.cache`, `coverage/` - **Spring Boot**: `.mvn/`, `target/` ## 更新配置 修改本地 `C:\Users\你的用户名\.gitignore_global` 后,同步到仓库: ```bash cd dotfiles Copy-Item "$env:USERPROFILE\.gitignore_global" ".gitignore_global" git add . git commit -m "Update .gitignore_global" git push ```