code-branchVersion Control & Git

Branching, versioning, and connecting to your repositories

Calvin has built-in version control that integrates with your existing Git workflows. Every workspace maintains a complete version history, and every chat operates on its own feature branch to keep changes isolated until you are ready to merge.

The version selector in the workspace toolbar displays a list of all saved versions (v1, v2, v3, and so on) with timestamps showing when each was created. You can click on any version to view or restore the workspace to that point in time. This gives you a safety net — if a chat goes in the wrong direction, you can always roll back.

Each chat automatically creates a feature branch. When you create a new chat, Calvin branches off from the target branch, and all work the agent does happens on that feature branch. This means multiple chats can run in parallel within the same workspace without conflicting. The current branch name is displayed at the bottom of the workspace (for example, "feature/test"). When creating a new chat, you can specify a custom branch name under Advanced Options if you want to follow your team's naming conventions.

Calvin supports four source code management options, configured through the workspace settings. Internal Git is the default, where Calvin creates and manages a private Git repository for you. This is the simplest option and requires no external setup. Use GitHub lets you connect to your own GitHub repository, so Calvin pushes code directly to your GitHub account. Use Bitbucket connects to your Bitbucket repository. Use GitLab connects to your GitLab repository.

When using an external repository (GitHub, Bitbucket, or GitLab), Calvin syncs code bidirectionally. The agent works on feature branches within Calvin's environment, and when a chat is completed, changes are pushed to your external repository according to the configured chat closing action.

The target branch setting determines which branch feature branches merge into. The default is "main," but you can set it to "develop," "staging," or any other branch that fits your workflow. This is configured in the workspace settings panel.

The chat closing action defines what happens to code when a chat is completed. "Merge and Push" automatically merges the feature branch into the target branch when the chat is completed. This is ideal for teams that trust Calvin's output and want fast iteration. "Create Pull Request" creates a pull request to the target branch instead of merging directly. This is ideal for teams that want a human review step before code reaches the target branch, and it integrates naturally with your existing CI/CD pipeline.

The Git controls in the file explorer toolbar provide additional options. View Tree shows the complete file tree at the current state. Tools provides Git-related utilities. Take over gives you manual control of the Git state when needed.

Last updated