# git_tool **Repository Path**: pangzidemeng/git ## Basic Information - **Project Name**: git_tool - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-29 - **Last Updated**: 2025-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Git 学习 ## 什么是git • 修改:表示修改了文件,但还没保存到数据库中。 • 暂存:表示对一个已修改文件的当前版本做了标记,使之包含在下次提交的快照中。 • 提交:表示数据已经安全地保存在本地数据库中已提交 ![图片](image/1.png) 工作区:某个版本独立提取出来的内容。 放在磁盘上供你使用或修改。 暂存区:保存了下次将要提交的文件列表信息。 仓库: Git 用来保存项目的元数据和对象数据库的地方。 这是 Git 中最重要的部分,从其它计算机克隆仓库时,复制的就是这里的数据。 ## git 常用命令 ![常用命令](image/2.png) ### 仓库初始化 ``` git clone [--template=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o ] [-b ] [-u ] [--reference ] [--dissociate] [--separate-git-dir ] [--depth ] [--[no-]single-branch] [--no-tags] [--recurse-submodules[=]] [--[no-]shallow-submodules] [--[no-]remote-submodules] [--jobs ] [--sparse] [--[no-]reject-shallow] [--filter=] [--] [] ``` 拉去远程仓: `git clone https://gitee.com/pangzidemeng/git.git` 拉去指定分支:-b git clone https://gitee.com/pangzidemeng/filemanagement_file_api.git -b 0702 拉取分支的深度 --depth git clone https://gitee.com/pangzidemeng/filemanagement_file_api.git -b 0702 --depth 5 制定本地分支目录 -l git clone https://gitee.com/pangzidemeng/filemanagement_file_api.git -b 0702 --depth 5 -l file_api 本地共享库 只能使用本地仓库 git clone --shared /file_api git repack -a 远程共享库 优先使用本地仓库 git clone --reference /file_api https://gitee.com/pangzidemeng/filemanagement_file_api.git --disscociate 参数 断开与本地仓库的关系 ### git config ### git add ## 使用git的常用场景 ## 硬核git ## git 的学习网站 https://learngitbranching.js.org/?locale=zh_CN 参考网站:https://git-scm.com/