Link a project to a new repository
- Open the project’s settings on the GitHub tab and click Link Project.
- In Link Project to GitHub, pick the account under Owner and type a Repository name.
- Click Link. Polymet creates a new private repository and pushes every branch of the project to it.
- You see Project linked to GitHub. Click View on GitHub to open the repository.
How the sync works
New files pushed from GitHub show in the project’s files. They get a node on the canvas once the agent uses them in a page or component.
Sync from GitHub by hand
If a change from GitHub has not arrived, click Sync from GitHub (the arrows button next to the repository name). It syncs the branch you are on.Branches
- Every project branch has a GitHub branch of the same name. A branch you start in Polymet is pushed right away, and a name the repository already uses is refused.
- When you delete a branch, tick Also delete branch on owner/repo to remove it from GitHub too. It is off by default. A branch left on GitHub comes back into Polymet with its next push.
When GitHub refuses a push
Your change is always kept in Polymet. If GitHub refuses it because of a repository rule, secret scanning or a file over GitHub’s size limit, you see Saved in Polymet. GitHub refuses every later push of that branch too until you remove the secret or the file. A push to a protected branch is refused without a message.Unlink a project
- On the GitHub tab, open the menu next to the repository and click Unlink.
- In Unlink from GitHub?, click Unlink.
Related
- Connect GitHub — connect your account and install the Polymet app
- Import from GitHub or a ZIP — start a project from an existing repository
- Branches — start, compare and merge branches
- Export your code — download a ZIP instead