# Git教程 **Repository Path**: lzit_cs/GitTutorial ## Basic Information - **Project Name**: Git教程 - **Description**: Git极简教程 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-04 - **Last Updated**: 2026-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GitTutorial Git 版本控制入门教程 ## 简介 GitTutorial 是一个面向初学者的 Git 版本控制入门教程项目。本项目旨在帮助开发者快速掌握 Git 的基本操作和核心概念。 ## 特性 - Git 基础命令详解 - 分支管理策略 - 远程仓库操作 - 常用工作流介绍 - 实用技巧与最佳实践 ## 快速开始 ### 安装 Git **Windows:** ```bash 下载安装包并运行:https://git-scm.com/download/win ``` **macOS:** ```bash brew install git ``` **Linux (Debian/Ubuntu):** ```bash sudo apt-get update sudo apt-get install git ``` ### 配置 Git ```bash git config --global user.name "Your Name" git config --global user.email "your.email@example.com" ``` ## 基础命令 ```bash # 初始化仓库 git init # 克隆仓库 git clone <仓库地址> # 添加文件到暂存区 git add <文件名> git add . # 添加所有文件 # 提交更改 git commit -m "提交信息" # 查看状态 git status # 查看提交历史 git log # 推送至远程仓库 git push origin main # 拉取最新代码 git pull ``` ## 分支操作 ```bash # 创建分支 git branch <分支名> # 切换分支 git checkout <分支名> # 创建并切换分支 git checkout -b <分支名> # 合并分支 git merge <分支名> # 删除分支 git branch -d <分支名> ``` ## 贡献指南 欢迎提交 Issue 和 Pull Request! 1. Fork 本项目 2. 创建特性分支 (`git checkout -b feature/your-feature`) 3. 提交更改 (`git commit -m 'Add some feature'`) 4. 推送分支 (`git push origin feature/your-feature`) 5. 创建 Pull Request ## 许可证 本项目采用 MIT 许可证,详见 [LICENSE](LICENSE) 文件。