Connect your workspace to GitHub for two-way synchronization between your workspace and a repository.
Your enterprise needs the GitHub integration configured first. Once that's in place, there are a few ways to connect a workspace to a repository.
When creating a workspace. You can connect to an existing GitHub repository right when you create a new workspace. The repository's files are pulled into the workspace automatically.
From an existing workspace. If you started from scratch and want to connect later, use the GitHub icon at the top right corner of the editor to connect the workspace to a repository or create a new one. If your enterprise hasn't set up the GitHub integration yet, the + button in the bottom left corner of the chat lets you start that process.
Once connected, files created or modified in the workspace are committed and pushed to the selected branch. Pushes to the branch in GitHub are automatically pulled into the workspace via webhooks.
You can sync with any branch. A dedicated branch for Infracodebase changes, your main branch, or a feature branch.
When you're ready to push your work to GitHub, use the Publish button in the editor. It walks you through creating a branch, committing with an AI-generated message, pushing to remote, and creating a pull request. See Publishing for the full flow.
Once a workspace is connected to a GitHub repository, the workspace's visibility is controlled by GitHub. If the repository is private, the workspace is private. You cannot change workspace visibility from within Infracodebase while it is connected to a repository. This prevents accidentally exposing private code in a public workspace. To change visibility, update it in GitHub and the workspace will follow.
Disconnect at any time from workspace settings. Files in both the workspace and repository are preserved. Only the sync stops.