Auto-sync: 2026-04-20 00:02

This commit is contained in:
2026-04-20 00:02:56 +08:00
parent 8341ee6cc4
commit 6ab2838935
104 changed files with 4077 additions and 31 deletions

38
wiki/concepts/Git.md Normal file
View File

@@ -0,0 +1,38 @@
---
title: "Git"
type: concept
tags: [Git, VCS, 版本控制, DevOps]
sources: [ctp-topic-2-git.md]
last_updated: 2026-04-19
---
## Definition
Git分布式版本控制系统是一种开源的分布式版本控制系统用于跟踪代码变更、支持多人协作开发。每个开发人员都拥有完整的代码仓库副本支持离线工作、分支合并和历史追溯。
## Core Features
- 分布式架构:每个用户拥有完整仓库副本
- 分支管理:支持轻量级分支和快速合并
- 完整性保证:使用 SHA-1 哈希确保数据完整性
- 性能:本地操作极快,网络操作按需拉取
## Common Commands
- `git clone`:克隆远程仓库
- `git add` / `git commit`:暂存和提交更改
- `git push` / `git pull`:推送和拉取远程更改
- `git branch` / `git checkout`:分支管理
- `git merge` / `git rebase`:合并分支
## Related Concepts
- [[Infrastructure as Code (IaC)]]
- [[CI/CD 流水线]]
- [[GitOps]]
## Related Entities
- [[GitHub]]
- [[GitLab]]
- [[Gitea]]
## Aliases
- Git
- Git 版本控制
- 分布式版本控制