Source Control
The Source Control panel provides a comprehensive Git workflow directly inside Studio. Open it by clicking the branch icon in the toolbar or via the command palette → “Source Control: Show Git Panel”.
Git Operations dropdown
Click the Source Control button in the toolbar to open the Git Operations dropdown — a unified menu for all Git actions:
Branch management
| Operation | Description |
|---|---|
| Create Branch | Creates a new branch from the latest origin/<default>. Fetches latest, auto-stashes dirty changes, creates the branch, and updates the branch badge — all silently (no terminal output). |
| Switch Branch | Switches to any local or remote branch. Auto-stashes uncommitted changes before switching, then pulls the latest with fast-forward. |
| List Branches | Runs git branch -a in the terminal to show all local and remote branches. |
Changes
| Operation | Description |
|---|---|
| View Changes | Opens the Smart Diff View showing all modified files with word-level diffs and AI annotation buttons. |
| Commit & Create PR | Opens the full Git panel with commit message, branch name, and PR body fields. |
Info commands (visible in terminal)
| Operation | Command | Description |
|---|---|---|
| Status | git status -sb | Short-format status with tracking info |
| Log | git log --oneline --graph --decorate -15 | Visual commit history (last 15) |
| Diff | git diff --stat && git diff | Summary + full diff of uncommitted changes |
Stash
| Operation | Command | Description |
|---|---|---|
| Stash All | git add -A && git stash push -m "studio-stash-<timestamp>" | Stashes all changes including untracked files |
| Stash Pop | git stash pop | Restores the most recent stash |
Sync
| Operation | Command | Description |
|---|---|---|
| Pull (rebase) | git fetch origin && git pull --rebase origin <branch> | Fetches and rebases for linear history |
| Push | git push -u origin <branch> | Pushes and sets upstream tracking on the first push |
| Fetch All | git fetch --all --prune | Fetches from all remotes and cleans stale refs |
History
| Operation | Description |
|---|---|
| File History | Shows git log --follow for the currently active file in the terminal |
| Branch Compare | Shows git log --all --graph to compare branches visually |
| Cherry-pick | Shows recent commits and prompts for a SHA to cherry-pick |
| Revert | Shows recent commits and prompts for a SHA to revert |
Branch badge
The toolbar displays the current branch name (e.g. main, feature/auth). When you create or switch branches via Git Operations, the badge updates instantly — no page reload required. The badge appears in three locations: the toolbar header, the Git dropdown, and the status bar.
Draft system
Every edit in Studio is auto-saved as a draft — a server-side record of your changes tied to the repository and branch. Drafts are the Studio equivalent of uncommitted changes. They persist across browser sessions and are visible in the Source Control panel.
The panel lists all files with pending drafts:
| State | Indicator | Description |
|---|---|---|
| Modified | Yellow dot | File content differs from the committed version |
| New | Green + | File was created in this session |
| Deleted | Red − | File was marked for deletion |
Click any file in the list to open it in the editor. Click the discard icon (↩) next to a file to revert it to the committed version.
Creating a pull request
To commit your changes and open a PR:
- Write a commit message — type a summary in the commit message field. Click the sparkle icon (✦) to have Cendra auto-generate a commit message based on your changes.
- Set a branch name — expand “Advanced” to specify a branch name. If left empty, a default branch is created.
- Add a PR body (optional) — expand “Advanced” to add a pull request description. Click the AI button to have Cendra generate a PR description from your diffs and commits.
- Click “Create PR” — Studio pushes your drafts as a commit, creates the branch, and opens a pull request on the upstream provider (GitHub, GitLab, etc.).
After success, a link to the pull request is displayed directly in the panel.
AI commit messages
Click the Generate button (✦) next to the commit message field to have Cendra analyze your changes and write a conventional commit message. The generation streams in real time and can be stopped or edited before committing.
AI PR description
Click the Generate button next to the PR body field to have Cendra write a pull request description based on your changes, commit history, and diff summary. The generated description includes a summary of what changed and why.
View changes
Click “View changes” at the top of the Source Control panel to open the Smart Diff View, showing a word-level diff of all modified files with a Cendra-generated summary.
SCM compatibility
All Git commands use standard git CLI — the Studio works with any Git-based SCM provider:
- GitHub
- GitLab
- Bitbucket
- Azure DevOps
- Any self-hosted Git server
API
The Source Control panel uses these backend endpoints:
| Method | Endpoint | Description |
|---|---|---|
GET | /projects/:id/drafts | List all draft files for the current project |
POST | /projects/:id/drafts | Create or update a draft file |
DELETE | /projects/:id/drafts/:path | Discard a draft |
POST | /projects/:id/pull-request | Commit drafts and create a PR |