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

# Connecting GitHub

> Link your Archie project to a GitHub repository.

Connect your project to a GitHub repository to pull code, sync changes, and use GitHub-based workflows for deploys and reviews.

## What you get

* **Code sync** — generated code appears as commits in your repository
* **PR-based workflow** — work in branches, review diffs, merge to deploy
* **Self-hosting** — pull the code and host anywhere
* **CI integration** — wire up GitHub Actions for tests and custom deploys

## Connecting

1. Open **Project → Settings → GitHub**.
2. Click **Connect GitHub**. You will be redirected to GitHub to authorize Archie's app.
3. Pick the repository (existing or new) to link.
4. Confirm the branch strategy (main-only, or main + dev).
5. Save.

Archie pushes the initial commit and starts syncing on each build.

## What gets pushed

* Generated frontend, backend, schema, migrations, and configuration
* Custom function handlers
* Project metadata (blueprint, specifications) as YAML or JSON for reproducibility {/* VERIFY: confirm whether blueprint state is committed and in what format */}

What is not pushed:

* Secrets and credentials — they remain in Archie's encrypted store
* Build artifacts (containers, dist folders) — only source

## Branch strategy

By default, Archie targets `main`. For PR workflows, you can configure Archie to push to a feature branch and open a PR for human review before merging.

## FAQ

<AccordionGroup>
  <Accordion title="Can I commit by hand and push to the linked repo?">
    Yes. Local commits sync back into Archie on the next pull. Be careful with merge conflicts.
  </Accordion>

  <Accordion title="What happens if the GitHub OAuth fails?">
    The app shows an error page and asks you to retry. Common causes: revoked GitHub permissions, two-factor required.
  </Accordion>
</AccordionGroup>
