# 什么是仓库？

\_仓库\_或 [Git 项目](https://git-scm.com/) 包含与项目关联的整个文件与文件夹集合，以及每个文件的修改历史记录。文件历史记录呈现为被称作\_提交\_的快照，并且提交是以链接列表关系的方式存在的，并且可以组织成被称为\_分支\_的多个开发版本。由于 Git 是 DVCS，因此仓库是自包含单元，拥有仓库副本的任何人都可以访问整个代码库及其历史记录。使用命令行或其他易用的接口，git 仓库还允许：与历史记录、克隆、创建分支、提交、合并和比较不同代码版本之间的变更等进行交互。

在仓库中工作可以保持开发项目的组织和保护情况。这可以鼓励开发人员修复错误或创建新功能，而不必担心会破坏主线开发工作。Git 通过使用主题分支来实现这一点：历史记录中提交的轻量级指针可以轻松创建并在不再需要时弃用。

通过像 GitHub 这样的平台，Git 还为项目透明度和协作提供了更多机会。公共仓库可帮助团队协同工作，以构建最佳的产品。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://github.highlight.ink/git-handbook/repositories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
