---
title: "Repositories"
description: "Connect and sync GitHub repositories, group related codebases into environments, and configure Git commit and pull request attribution."
url: "https://www.thecompany.company/docs/code/repositories"
---

# Repositories

> Connect and sync GitHub repositories, group related codebases into environments, and configure Git commit and pull request attribution.

Your organization's GitHub App installation controls which repositories agents can clone and modify. Your personal GitHub connection is separate: it identifies you when you mention `@co` on GitHub and lets agents open pull requests under your GitHub account.

## Setup [#setup]

1. ### Install the GitHub App [#install-the-github-app]

   As an organization owner or admin, [install the GitHub App](/docs/integrations/github#install-the-github-app) and select the repositories your team wants to grant access to.
2. ### Verify the synced catalog [#verify-the-synced-catalog]

   Open **Settings → Repositories** to view synced repositories and each repository's default branch. To change a default branch, update it in GitHub and refresh the catalog.
3. ### Refresh when repositories change [#refresh-when-repositories-change]

   If a repository is missing, clear active filters, verify the GitHub App's repository access in GitHub, and select **Refresh repositories**.

## Multi-repository environments [#multi-repository-environments]

When changes span multiple repositories—such as a backend API, shared library, and web client—group them into one [environment](/docs/code/environments). An owner or admin can select multiple repositories when creating an environment, or choose **Add to environment** from any repository's row menu.

In a multi-repository session, name the target repository explicitly in your prompt so the agent edits the right codebase.

## Git attribution [#git-attribution]

Configure how commits and pull requests are authored in **Settings → Preferences → Git**. Commit attribution and pull request attribution are independent settings:

| Setting | Behavior |
| --- | --- |
| **Commit email** | The email address Git records when commits use your identity. |
| **Commit attribution** | **You and the agent** sets you as author and the agent as committer. **Only you** uses your identity for both. **Only the agent** attributes both to the agent. |
| **Pull request attribution** | **You** opens PRs with your linked GitHub account when available. **The agent** opens PRs through the workspace GitHub App. |

## Troubleshooting [#troubleshooting]

- **Repository not listed:** Confirm the repository is included in the organization's GitHub App installation on GitHub, clear any search or filter in **Settings → Repositories**, and select **Refresh repositories**.
- **Outdated default branch:** Default branches sync from GitHub. Update the default branch in GitHub first, then refresh the catalog.
- **PRs open under the app instead of your account:** Check that your personal GitHub account is connected and **Pull request attribution** is set to **You** in **Settings → Preferences → Git**.

## Next steps [#next-steps]

- [Environments](https://www.thecompany.company/docs/code/environments.md): Bundle repositories with install scripts and warm snapshots.
- [GitHub](https://www.thecompany.company/docs/integrations/github.md): Link your personal GitHub account and trigger work from PRs.
- [Pull requests](https://www.thecompany.company/docs/code/pull-requests.md): Open draft PRs, fix CI, and work with stacked branches.
- [Code review](https://www.thecompany.company/docs/code/code-review.md): Enable automated PR reviews per repository.
