# Connect GitHub

URL: https://getflowing.ai/docs/integrations/github

Keep your apps' code in your own GitHub account, or let GetFlowing host it. Connect accounts, choose repositories and take your code with you.

GitHub is optional. By default, GetFlowing keeps a new app's code for you in a private repository, so you can build and deploy without a GitHub account. Connect GitHub when you want the code in your own account or organisation, or to import an app you already have there.

## Connect a GitHub account

<Steps>
<Step>
### Open Connections

Go to **Settings**, then **Workspace**, and find the **GitHub** card under **Connections**. Only owners and admins can connect an account.
</Step>
<Step>
### Install the GetFlowing GitHub App

Choose **Connect GitHub**. GitHub opens its own page, where you choose the account or organisation and which repositories GetFlowing can see: all of them, or only the ones you pick.
</Step>
<Step>
### Come back to GetFlowing

The account appears on the card, with how many repositories it shares. Choose **Change on GitHub** at any time to share more or fewer.
</Step>
</Steps>

If the GetFlowing GitHub App is already installed on your GitHub account, choose **Already installed on GitHub? Find it** instead. For an organisation, one of its owners may have to approve the app first. GitHub tells them, and you add the account again once they have.

## Several GitHub accounts

A workspace can connect more than one GitHub account, up to its plan's limit:

| Plan | GitHub accounts |
| --- | --- |
| Deploy | 1 |
| Starter | 1 |
| Pro | 2 |
| Business | 5 |
| Scale | 10 |
| Enterprise | Unlimited |

Each account's menu has:

- **Set as default for new apps**: where a new app's repository goes unless you choose another.
- **Allow repo creation**, for a personal account: lets GetFlowing create a new app's repository in that account by itself.
- **Disconnect**: see below.

If you move to a plan with fewer accounts, the accounts you already have stay connected. You just cannot add another until you are under the limit.

## One account, one workspace

A GitHub account can be connected to one GetFlowing workspace at a time. If you own an account that another workspace uses, GetFlowing offers to move it to yours. The other workspace's apps keep running, but cannot be built, deployed or changed until it connects the account again, and its owners and admins are told that the account moved, though not where.

## Disconnecting, and lost access

When you disconnect an account, or it is suspended or uninstalled on GitHub, the apps that use it keep running. GetFlowing cannot build, deploy or change them until you connect the account again or move them to another account, and each app's page says why. If a repository is no longer shared with GetFlowing, add it back to what the GetFlowing app may reach on GitHub. When you reconnect an account, its apps are attached to it again.

Disconnecting does not uninstall the GetFlowing app from GitHub. Uninstall it on GitHub if you no longer want it there.

## Code GetFlowing hosts for you

An app whose code GetFlowing hosts shows **Hosted by GetFlowing** in its **Settings**, under **Git**. The code is yours, and you can have it whenever you like, free:

- **Download with history** gives you the whole repository, with every commit.
- **Transfer to GitHub** moves the repository to a personal GitHub account of yours. GitHub may ask that account to accept the transfer by email: accept it within a day. The account must not already have a repository with the same name.

Only owners and admins can take the code out. After a transfer, connect the GitHub account the repository went to, so GetFlowing can keep building the app.

## How the agent's work reaches GitHub

On plans with GetFlowing's agent, each change is made on a branch and opened as a pull request in the app's repository, where you can read and review it. You can merge it in GitHub, or from the app's chat with **Merge PR #N and deploy**, which merges the pull request and deploys the merged code. See [The AI engineering team](https://getflowing.ai/docs/ai/engineering-team).
