# GitHub import and synchronization

Open `/import/github` while signed in. The page offers public-source imports and
repositories available through your connected GitHub account. Repository creation
requires verified email and permission to create under the destination owner.

## Create an account with GitHub

Choose **Migrate from GitHub** on the sign-up page and complete GitHub
authorization in the same browser. If the return to GitCafe fails, follow the
page's restart instructions and check that the browser allows cookies. If your
chosen email address is not verified by GitHub, verify it using the email from
GitCafe before importing repositories.

## Import a public repository

Under **Import a public repository**, enter `owner/repository` or a GitHub URL.
Review the discovered repository and import-size information, choose an available
destination owner and repository name, then start the import. A source exceeding
the reported import ceiling is refused.

Public-source imports do not require linking a GitHub account. They are read-only
mirrors that follow GitHub, including supported pull request and issue data;
this mode does not enable writes back to GitHub.

## Import from a connected account

Choose **Connect GitHub** and complete authorization, then select the GitHub
account/installation and repositories available to it. Choose their destination
owner and names. The selection holds up to ten repositories. Imported repositories
retain their GitHub visibility.

By default, connected imports copy Git once and import supported issues, pull
requests, reviews and comments without writing back to GitHub. To opt in, select
**Enable two-way sync, including writes to GitHub** for that repository. Choose
**GitCafe wins** or **GitHub wins** for changes made on both sides. Two-way sync
requires the corresponding GitHub write authorization; connecting an account
alone does not enable it.

## Progress and interrupted imports

Use **Import selected** to start. Each repository keeps its own progress and
failure message. **Browse code** can become available before discussion import
finishes; it does not mean every part of synchronization is complete.

Progress is retained for your account in this browser tab across refreshes.
Imports already accepted by GitCafe can continue if you leave the page. **Continue
imports** or a repository's **Continue** control checks retained progress and
resumes supported work. Do not assume closing the tab cancelled the import or
that an uncertain response means the destination was never created.

## Repository sync settings

To mirror a branch with another Git server, use [Git mirrors](https://git.cafe/docs/integrations/git-mirrors.md).

Open **Settings → GitHub sync** at `/<owner>/<repo>/settings/github`. This
dedicated page manages Git history alongside issues, pull requests, reviews,
comments and discussion metadata. It shows the connected source, direction, Git and
discussion status, recent jobs and writes awaiting settlement. Depending on the
repository's state and your authority, it offers connection/reconnection,
completion of initial sync setup, authorization renewal and reconciliation.

Use **Renew authorization** when the connection asks for it. GitCafe checks
your current GitHub permissions before continuing sync.
If the connection has expired or been revoked and cannot refresh, open **Account
connection**, reconnect GitHub, and retry. Repository permissions still apply.

Initial Git work must finish before synchronization can be configured. Two-way
mirrors expose **When both sides change**; changing the winner does not stop
one-sided changes from syncing in either direction. Public mirrors without an
App connection remain read-only.

A pending local change is not proof that GitHub received it. The page distinguishes
**Not delivered** writes from those **Awaiting confirmation**. The latter may
already be on GitHub; reconciliation reads the existing outcome.
Use **Reconcile now**
where offered to inspect the retained operation. Resolve reported conflicts,
blocked jobs or authorization problems before assuming convergence. **Retry
import** is offered only for an eligible blocked initial import with no unfinished
Git operation.
