# 创建、浏览与 Git 操作

> 区分个人和团队仓库可见性，使用标准 Git 并查看代码和提交历史。

- 网址：https://funcoding.ai/agents/cursor/origin/repositories/
- 核实日期：2026-10-07（命令、配置和价格以官方文档为准）
- 官方来源：[Cursor 官方文档：Create Repository](https://cursor.com/docs/origin/create-repository)、[Cursor 官方文档：Clone Push Pull](https://cursor.com/docs/origin/git)、[Cursor 官方文档：Browse and Search](https://cursor.com/docs/origin/browse)

---
在 codebase 首页选择 New 创建空仓库。已有 GitHub 项目选择 Sync from GitHub，保留源平台关系，而不是误建无关的同名空仓库。

## 可见性

团队仓库可选 Internal 或 Private。Internal 对有 codebase 访问的团队成员可见；Private 仅直接获准或通过 codebase permissions 获准的人可见。

个人仓库始终 Private，创建时没有可见性选择器，默认只有自己可见；分享通过 Settings > Collaborators 邀请。团队仓库则通过 Access 管理。

## 使用 Git

先用 origin auth login 登录并配置 credential helper，再从绿色 Code 按钮复制 HTTPS URL：

```bash
git clone https://origin.cursor.com/acme/checkout.git
```

现有项目可添加 Origin remote；若已存在 origin，先确认其指向，避免直接覆盖。正常 fetch/pull/push 使用标准 Git；镜像仓库的特殊落点见[镜像](https://funcoding.ai/agents/cursor/origin/mirrors/)。

Cursor local agent 可在任务中通过 Origin CLI 创建仓库、设 remote 并推送，仍使用账号本身权限。Cloud Agents 可对已有 Origin 仓库 clone、branch、commit、push。

## 浏览与搜索

Code 页提供文件树、branch 切换、Go to file（T）和代码搜索。进入当前 branch 的 commit history 查看 message、metadata 和 diff，切换分支后再查看对应历史。

Pull Requests、Settings 与 Code 并列。原生仓库 PR 留在 Origin；GitHub 镜像中的 Cloud Agent PR 在 GitHub 创建，浏览入口不能改变源平台事实。
