Documentation Connect a repository
Connect a repository
Link a CloudCode project to a GitHub repository so you can push your files to it, pull changes back, and work with branches, pull requests, CI and issues from inside the IDE.
1
Open the GitHub tab
It's in the right panel, next to Preview and Files.
2
Authorize CloudCode
Click "Connect GitHub" and approve the OAuth request on GitHub. Your token is stored server-side and you can disconnect at any time from the same tab.
3
Link, import or create a repo
In the Repos tab, search your repositories. Click a repo to link it to this project. "Clone into project" imports the repo's files, either overwriting the current files or adding them in a subfolder. "New project" creates a fresh project from the repo. You can also create a new repository (private by default) and link it in one step. To import while creating a project, paste a GitHub URL into the New project dialog (up to 200 files are imported).
4
Push and pull
Syncing is manual. The Push tab commits your project files to the branch you choose as a single commit. You can have AI write the commit message, and CloudCode adds a .gitignore and a .env.example if the project doesn't have them. The Pull tab fetches a branch and flags files that differ from your copy, letting you keep the local or remote version of each one. The Commits tab lists recent commits.
Warning
Nothing is pushed automatically. Edits made by you or the agent stay in CloudCode until you push from the Push tab or run
git push in the terminal.Note
CloudCode requests the
repo and read:user OAuth scopes. GitHub's repo scope grants read/write access to every public and private repository your account can access, including organization repos where the org allows OAuth apps. GitHub doesn't let OAuth apps limit this to selected repositories. CloudCode doesn't request org-admin, billing or account-management scopes.