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

# Overview

> Connect GitHub to your Rocket.new app: push code to repos, collaborate with your team, and keep version history.

export const LlmsDirective = () => <blockquote className="llms-directive">
    For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
    For a lightweight markdown version of this page, append .md to the URL.
  </blockquote>;

<LlmsDirective />

Connect GitHub and push your task code to a repository with one click. Rocket handles the Git setup automatically, no terminal needed.

For **Next.js TypeScript** tasks, Rocket supports full two-way sync: push automatically creates a `rocket-update` branch and opens a pull request to `main`, and pull brings changes from `main` back into your task. For all other frameworks, GitHub integration is one-way and manual — click **Push** when you want to update GitHub. No automatic pull request is created.

<Divider />

## What you can do

<CardGroup cols={2}>
  <Card title="Automated backups" icon="cloud-arrow-up">
    Push your Rocket project to GitHub whenever you want a snapshot of your work. Click the GitHub icon in the toolbar and push.
  </Card>

  <Card title="Team collaboration" icon="users">
    Share your codebase with teammates by pushing to a shared GitHub repo. They can review, fork, or clone your code from there.
  </Card>

  <Card title="CI/CD pipelines" icon="gears">
    Once your code is on GitHub, connect it to services like GitHub Actions, Vercel, or Netlify for automated builds and deployments.
  </Card>

  <Card title="Open-source portfolio" icon="folder-open">
    Publish your Rocket projects as public repositories to build a developer portfolio or contribute to open source.
  </Card>
</CardGroup>

<Divider />

## Connect GitHub

GitHub connects via OAuth, so no API key is needed. It is a **workspace-level** connector, so connect it once and it is available across all tasks.

<Tabs>
  <Tab title="Web Browser">
    You can connect from four places. All do the same thing.

    **Option 1: When creating a task (Clone from GitHub)**

    Click the **+** button at the lower left of the input box on the home screen and select **Clone from GitHub**. If you have not connected GitHub yet, Rocket prompts you to authorize at this point.

    <Card title="Import from GitHub" icon="github" href="/build/create/from-github" horizontal arrow="true">
      Clone a Next.js TypeScript repo and continue building with AI.
    </Card>

    **Option 2: From the GitHub button in the toolbar**

    Click the **GitHub** icon in the top-right of the code view toolbar. A popup opens with a **Connect** button.

    <Frame caption="GitHub connect popup from the toolbar">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connect-popup-light.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=92f0d95447692e497a28ac1e31ebad9b" alt="GitHub connect popup showing a Connect button." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-connect-popup-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connect-popup-dark.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=7ec0b06bf0d1cfd9a51137669b9b8f2b" alt="GitHub connect popup showing a Connect button." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-connect-popup-dark.webp" />
    </Frame>

    **Option 3: From the Connectors tab**

    Click the **`...`** button in the preview toolbar, then select **Connectors**.

    <Frame caption="Open Connectors from the toolbar">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/shared/connectors-tab-open-light.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=7bd785a0e878564054e08328b2aa3d6b" alt="Toolbar dropdown with Connectors option highlighted." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/shared/connectors-tab-open-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/shared/connectors-tab-open-dark.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=d047040372d776cb47e4e483de8eeb8d" alt="Toolbar dropdown with Connectors option highlighted." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/shared/connectors-tab-open-dark.webp" />
    </Frame>

    Click the **GitHub** card, then click **Connect**.

    <Frame caption="GitHub card in the Connectors panel">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connectors-tab-light.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=bccc7db90eb5851f83d220faece06e2b" alt="Connectors panel showing the GitHub card with a Connect button." className="theme-image light-image" width="1813" height="486" data-path="images/build-docs/connectors/github/web-browser/github-connectors-tab-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connectors-tab-dark.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=b474a280a9a3c8cf373b362ecc5b6442" alt="Connectors panel showing the GitHub card with a Connect button." className="theme-image dark-image" width="1822" height="481" data-path="images/build-docs/connectors/github/web-browser/github-connectors-tab-dark.webp" />
    </Frame>

    **Option 4: From workspace Settings**

    <Card title="Connect from workspace Settings" icon="plug" href="/getting-started/workspace/connectors" horizontal arrow="true">
      Connect once from Settings and it is available across all tasks.
    </Card>

    **After clicking Connect**

    You are redirected to GitHub's authorization page. Sign in if prompted, review the permissions, and click **Authorize DhiWisePvtLtd**.

    <Frame caption="Authorize Rocket on GitHub">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connect-light.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=7c11d5fb22385d6e21cc7d55b92a25cf" alt="GitHub OAuth authorization page for rocket.new." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-connect-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-connect-dark.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=e1ba28495694e04961b11e3a24f32c57" alt="GitHub OAuth authorization page for rocket.new." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-connect-dark.webp" />
    </Frame>

    After authorization you are redirected back to Rocket with GitHub connected.

    <Note>
      Permissions Rocket requests from GitHub: create new repositories on your behalf, read public and private repo names and metadata, and access your GitHub username and email address.
    </Note>

    **Disconnect**

    <Card title="Disconnect a service" icon="plug" href="/getting-started/workspace/connectors#disconnect-a-service" horizontal arrow="true">
      Disconnect or switch accounts from workspace Settings.
    </Card>
  </Tab>

  <Tab title="Mobile App">
    You can connect from two places. Both do the same thing.

    **Option 1: From the GitHub button in the toolbar**

    Tap the **GitHub** icon in the toolbar. In the popup, tap **Connect** to begin authorization.

    **Option 2: From the Connectors tab**

    <Steps>
      <Step title="Open More menu">
        Tap the **More** button in the header.
      </Step>

      <Step title="Open Integrations">
        Tap **Integrations**.
      </Step>

      <Step title="Connect GitHub">
        Tap the **GitHub** card, then tap **Connect**.
      </Step>
    </Steps>

    **After tapping Connect**

    Sign in to GitHub if prompted, review the permissions, and tap **Authorize DhiWisePvtLtd**. You are redirected back to Rocket with GitHub connected.

    <Note>
      Permissions Rocket requests from GitHub: create new repositories on your behalf, read public and private repo names and metadata, and access your GitHub username and email address.
    </Note>
  </Tab>
</Tabs>

<Divider />

## Push to GitHub

<Steps>
  <Step title="Open GitHub panel">
    Click the **GitHub** icon in the toolbar.
  </Step>

  <Step title="Push code">
    Click **Push** to send your task code to GitHub.
  </Step>
</Steps>

Rocket automatically creates a repository for you.

<Frame caption="Select a repository and push">
  <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-push-light.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=a62f5072fa676e49ea40ba652e42d777" alt="GitHub push dialog showing repository selection and Push button." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-push-light.webp" />

  <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/-yEl0B9S0cPv2W9c/images/build-docs/connectors/github/web-browser/github-push-dark.webp?fit=max&auto=format&n=-yEl0B9S0cPv2W9c&q=85&s=246fb9245f6194d4659e7d11777c64f4" alt="GitHub push dialog showing repository selection and Push button." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/github/web-browser/github-push-dark.webp" />
</Frame>

Push again anytime to update the repository with your latest changes.

For **Next.js TypeScript** tasks, Rocket pushes to the `rocket-update` branch and automatically opens a pull request to `main` each time. After the initial push, the button changes to **Pull from GitHub** so you can bring in the latest state of `main` from your local IDE or from teammates.

For all other frameworks, clicking Push sends your code to GitHub but no automatic pull request is created. Push manually whenever you want to update.

<Divider />

## Tips

* **Two-way sync for Next.js TypeScript.** After pushing, Rocket auto-creates a PR to `main` and the button switches to Pull from GitHub so you can import changes back into Rocket.
* **One-way sync for other frameworks.** Non-Next.js tasks support manual push only. No automatic PR is created — always make changes in Rocket first, then click Push when ready.
* **Branch behaviour.** For Next.js TypeScript, Rocket pushes to `rocket-update` and opens a PR to `main`. Pull always reads from `main`.
* **Repository naming.** Rocket automatically creates a repository for your task. Use a clear task name so repos are easy to find.
* **Public vs. private.** Public repos are great for portfolios. Private repos are better for client work or proprietary tasks.
* **Permissions are scoped.** Rocket only requests access to create repos and read metadata. It does not delete repos or modify existing code on GitHub.

<Divider />

## What's next?

<CardGroup cols={2}>
  <Card title="Code sync" icon="arrows-rotate" href="./code-sync">
    Two-way sync for Next.js TypeScript projects. Push changes out and pull external edits back in.
  </Card>

  <Card title="Netlify" icon="globe" href="/build/connectors/netlify">
    Deploy your Rocket app to the web. Works great after pushing code to GitHub.
  </Card>

  <Card title="Code tab" icon="code" href="/build/editor/code">
    Learn more about browsing and managing your project's source code in Rocket.
  </Card>
</CardGroup>
