> ## Documentation Index
> Fetch the complete documentation index at: https://docs.catdoes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Integration

> Connect your GitHub repository so AI agents can read your code, make changes, and push updates directly.

Connect your CatDoes project to a GitHub repository. Once connected, AI agents can read your existing code, make changes, commit them, and push updates to your repository — all while maintaining full git history.

<Note>
  GitHub integration requires an active paid subscription.
</Note>

## Connecting Your Repository

1. From your project dashboard, click **Connect GitHub**.
2. On GitHub, authorize the CatDoes app and select which repositories to grant access to.
3. Back on CatDoes, select the repository you want to link from the dropdown.
4. Choose the branch you want to work with (defaults to your repository's default branch).
5. Click **Link Repository**.

Your GitHub integration is now active. AI agents can now read, modify, and push code to the selected branch.

## Working with Branches

You can switch branches or create new ones directly from your project dashboard.

**To switch branches:**

1. Click **Change** next to your connected repository
2. Select a different branch
3. Click **Update**

**To create a new branch:**

1. In the branch dropdown, click **Create New Branch**
2. Enter a branch name (like `feature/new-feature` or `fix/bug-name`)
3. Optionally select which branch to create it from
4. Click **Create**

The new branch is created on GitHub and immediately available for use.

## How AI Uses GitHub

When you ask an AI agent to make changes:

1. The agent reads your existing code from the connected repository
2. Makes the requested modifications
3. Commits the changes with a descriptive message
4. Pushes to your selected branch

All changes are tracked in your git history, just like regular commits.

The agent can also:

* Pull the latest changes from GitHub before making modifications
* Handle merge conflicts if they arise
* Reset to the remote state if needed

## Changing or Disconnecting

**To change repository or branch:**

1. Go to your project dashboard
2. Click **Change** on the GitHub Integration card
3. Select a new repository and/or branch
4. Click **Update**

**To disconnect:**

1. Go to your project dashboard
2. Click **Disconnect** on the GitHub Integration card

Disconnecting removes the link but doesn't affect your repository on GitHub.

## Tips

<Tip>
  Work on feature branches instead of main. This keeps your main branch stable while letting the AI experiment on separate branches.
</Tip>

<Tip>
  Review AI commits on GitHub after they're made. Check the diff to see exactly what changed and why.
</Tip>
