Git核心概念解析

清夏晚风

工作区与版本库

1
2
3
4
graph TD
A[工作区] -->|git add| B(暂存区)
B -->|git commit| C[版本库]
C -->|git checkout| A

文件状态生命周期

状态 检测命令 转换操作
未跟踪 git status红色 git add
已暂存 git status绿色 git commit / git reset
已提交 git log git checkout

对象模型

1
2
3
4
5
graph LR
D[Commit] --> E[Tree]
E --> F[Blob]
E --> G[Tree]
D --> H[Parent Commit]
  • Blob:存储文件数据
  • Tree:目录结构
  • Commit:提交对象
  • Tag:标签对象
  • Title: Git核心概念解析
  • Author: 清夏晚风
  • Created at : 2026-01-13 16:48:23
  • Updated at : 2026-01-13 16:48:23
  • Link: https://blog.kimikkorow.eu.org/版本控制管理/Git/Git核心概念解析/
  • License: This work is licensed under CC BY-NC-SA 4.0.