# git-tutorial **Repository Path**: PhiloKun/git-tutorial ## Basic Information - **Project Name**: git-tutorial - **Description**: Git 安装教程与完整命令详解(中文) - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-10 - **Last Updated**: 2026-08-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Git 安装教程与完整命令详解 > 一份面向中文用户的 Git 从入门到实战的详尽教程仓库。覆盖 **各平台安装、首次配置、全部常用命令的逐参数解释,以及一条从零到团队协作的完整工作流**。 [![GitHub](https://img.shields.io/badge/GitHub-PhiloKun/git--tutorial-blue?logo=github)](https://github.com/PhiloKun/git-tutorial) [![Gitee](https://img.shields.io/badge/Gitee-PhiloKun/git--tutorial-red?logo=git)](https://gitee.com/PhiloKun/git-tutorial) [![License](https://img.shields.io/badge/license-MIT-green.svg)](#许可证) --- ## 📌 项目简介 Git 是现代软件开发的基石,但初学者常被「三大区」「分支」「rebase 与 merge 的区别」「reset 还是 revert」劝退。 本仓库用**最直白的中文 + 逐参数拆解**的方式,把 Git 的关键知识点讲透: - 不堆砌概念,每个命令都给出**语法 → 逐参数解释 → 示例**; - 标清**危险操作**(如 `reset --hard`、已推送分支的 rebase),避免误删代码; - 提供一条**端到端实战工作流**,照着敲就能跑通从建库到多人协作的全流程。 --- ## 📂 目录结构 ``` git-tutorial/ ├── README.md # 本文件:仓库总览 ├── Git安装教程.md # ① 各平台安装 + 首次配置(逐命令解释) └── Git命令详解与完整流程.md # ② 全命令详解 + 完整工作流实战 ``` --- ## 📖 文档内容概览 ### 1. `Git安装教程.md` —— 装好 Git | 章节 | 内容 | |------|------| | Git 是什么 | 版本记录 / 分布式 / 分支协作,一句话类比 | | 各平台安装 | Windows(安装包 / winget / choco)、macOS(Homebrew / Xcode 工具)、Linux(apt / yum / dnf),每条命令带参数解释 | | 首次配置 | `user.name` / `user.email` / `core.editor` / `init.defaultBranch` / `core.autocrlf` 等作用域与选项拆解 | | 验证安装 | `git --version` 及 Windows PATH 报错处理 | | 常见问题 | command not found、Author identity unknown、中文乱码、代理设置 | | 配置模板 | 一行复制即用 | ### 2. `Git命令详解与完整流程.md` —— 用好 Git | 章节 | 内容 | |------|------| | 三大区与核心概念 | 工作区 / 暂存区 / 版本库 / 远程仓库图解 + 口诀 | | 配置 / 仓库命令 | `config` / `init`(含 `--bare`)/ `clone`(HTTPS·SSH·`--depth`) | | 追踪与暂存 | `status` 状态码、`add`(`.`/`-p`/`-u`)、`.gitignore` 规则 | | 提交与查看 | `commit`(`-m`/`-a`/`--amend`)、`log`、`diff`、`show` | | 分支 | `branch` / `switch` / `merge` / `rebase` + 对比表 | | 远程 | `remote` / `fetch` / `pull` / `push`(`-u` / `--force-with-lease` / `--tags`) | | 撤销回退 | `restore` / `reset`(三模式)/ `revert` + 选型速记 | | 标签 / 贮藏 | `tag` / `stash` | | **完整工作流实战** | 6 个场景串起全部命令:本地建库 → 日常循环 → 推送远程 → 拉取协作 → 功能分支 PR → 出错补救 | | 速查总表 | 一张表覆盖日常 30+ 命令 | --- ## 🚀 快速开始 ```bash # 克隆本仓库(任选其一) git clone https://github.com/PhiloKun/git-tutorial.git # 或 git clone https://gitee.com/PhiloKun/git-tutorial.git # 打开文档阅读 cd git-tutorial ``` 如果你还没装 Git,先看 [`Git安装教程.md`](./Git安装教程.md); 装好后想系统学命令与工作流,看 [`Git命令详解与完整流程.md`](./Git命令详解与完整流程.md)。 --- ## 👥 适用人群 - 刚接触 Git 的**新手**,需要一份能照着敲的中文教程; - 会用基础 `add` / `commit` / `push`,但**搞不清 reset / revert / rebase** 的进阶学习者; - 需要给团队做 Git 入门培训、寻找**现成讲义**的负责人。 --- ## 🔗 相关链接 - GitHub 仓库: - Gitee 仓库: --- ## 📝 许可证 本仓库内容采用 **MIT 许可证** 发布,可自由阅读、转载与二次创作,请保留原作者署名。 --- *最后更新:2026-08-10*