Files
nexus/wiki/concepts/Git.md
2026-04-20 00:02:56 +08:00

38 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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 版本控制
- 分布式版本控制