# git **Repository Path**: hl_tools/git ## Basic Information - **Project Name**: git - **Description**: git 工具 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-11 - **Last Updated**: 2026-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 首次使用配置 在使用 Git 前必须设置**用户名**和**邮箱**(每次提交都会记录这些信息)。 打开 **Git Bash**(右键桌面或文件夹 → `Git Bash Here`)或 CMD,输入: bash ``` git config --global user.name "你的名字" # 例如 git config --global user.name "Zhang San" git config --global user.email "你的邮箱" # 例如 git config --global user.email "zhangsan@example.com" ``` **可选配置**(提升体验): bash ``` # 设置默认分支名为 main(旧版默认 master) git config --global init.defaultBranch main # 启用彩色输出 git config --global color.ui auto # 查看所有配置 git config --list ```