跳转到内容

Repository

“Repository”(常缩写 repo)是存放项目源代码、历史提交与分支的中央存储,如 GitHub repository。在领域驱动设计中,repository 也指封装数据访问逻辑的设计模式。

  1. “Clone the repository and run npm install.” (克隆仓库并运行 npm install。)
  2. “The monorepo hosts several packages in one repository.” (单体仓库在一个 repository 里托管多个包。)
  3. “She opened a pull request against the main repository.” (她向主仓库提交了拉取请求。)

源自拉丁语 repositorium(存放处),re-(回)+ ponere(放置)的派生,经法语进入英语。

“re-” + 与“放置”相关的词根 + “-ory” 表场所。

开源文化围绕 public repository 展开;README、LICENSE、CI 配置是 repo 标配文件。

  • 固定搭配: “Git repository” (Git 仓库), “private repository” (私有仓库), “repository pattern” (仓储模式)
  • 简称: repo

re(反复)+ pository(放置处)——代码反复提交放置的地方,就是 repository。

“The security scan blocked the merge because the repository still contained an exposed API key.” (安全扫描阻止合并,因为仓库里仍有泄露的 API 密钥。)