Skip to content
Source

Import from GitHub

Your repository is on GitHub, with years of issues and pull requests. You want to move it to TanStack Source and lose nothing.

The import copies the git history and, for a github.com URL, every issue and pull request. They keep their GitHub numbers, so #123 still points at the same item.

To move many repositories, or a whole GitHub organization with its profile and image, see Import a GitHub organization.

1. Start the import

  1. Open New repository.
  2. Turn on Import from GitHub.
  3. If the form shows Connect GitHub, click it. To see private repositories, tick Private repositories too first. GitHub asks you to allow access, then sends you back to the form.
  4. In GitHub repository, type a part of the name, and pick the repository from the list.
  5. Keep Import issues and pull requests on.

Then check the Owner and the Repository name, and click Begin import. The form uses the GitHub name, and makes the copy private when the repository is private on GitHub.

The import uses your GitHub connection, so you paste no token. The forge keeps a copy of the token encrypted while the import runs, then deletes that copy.

The import is a copy. To also get what happens on GitHub after the import, turn on Keep in sync with GitHub in the same form. The connection is the same one that sync uses: see Sync with GitHub.

To import from another git host, click Import from another git URL instead. Paste the URL into Repository URL, and paste a token into Access token if the repository is private.

2. Watch the progress

The repository page shows each step of the import. 2,000 issues and pull requests take a few minutes.

If GitHub's rate limit stops the import, it waits and then continues. If the import stops with an error, an admin can paste a new token and click Resume.

3. Point your clone at the forge

Install src and log in (steps 2 and 3). Then, in your clone:

git remote set-url origin https://gitflare.t-zlak97.workers.dev/<owner>/<repo>.git
git fetch origin

4. Keep using the gh commands

src takes the commands and flags of gh. Add an alias, and your habits stay the same.

In bash or zsh:

alias gh=src

In PowerShell:

Set-Alias gh src

To keep the alias, add the same line to ~/.bashrc, ~/.zshrc or your PowerShell $PROFILE. src help support lists the commands that work now.

What comes over

  • Copied: comments, reviews, line comments, replies, resolved threads, labels and assignees.
  • Events: closed, reopened, merged, renamed, labeled and assigned.
  • People: a GitHub person has no account here. Each one shows as their GitHub login, with a link to their GitHub profile.
  • Screening: with Screen open issues and pull requests on, open items are screened before they show. Comments, and closed and merged items, show at once.
  • Large files: a file can be up to 128 MiB. GitHub refuses files over 100 MiB, so every file of a GitHub repository comes over.

Done

Your repository, its issues and its pull requests are on TanStack Source, and git push goes there.

Next: Switch from GitHub has the other steps of the move: CI, branch rules, your team and your agents. If outside people keep using GitHub, sync with GitHub.