DocsGuides

Source control

Review agent changes, stage and commit, manage branches and browse history, all inside the IDE.

Git is the final checkpoint for everything an agent does, so Rusty has it built in. Open Source Control from the left rail. The icon shows a badge with the number of changed files, counting staged and unstaged changes across every repository in the workspace.

Note

Source Control needs a folder to be open first. If you see Open a folder first to view Source Control, use Open Workspace.

Repositories

A workspace can contain more than one repository, for example submodules or worktrees. Use the Select repository menu at the top to switch between them. Each repository has its own status, branch and history. For submodules there are actions to register one locally without cloning it, and to sync its local URL from .gitmodules.

Review and stage changes

The change list separates staged and unstaged changes. Open a file's diff to see exactly what changed, including what an agent just wrote. Right-click a change for more options, such as Add to Git and Add to .gitignore.

In the file tree, files show their Git state so you can see at a glance what has changed.

Commit

Type a message in the commit box and press ⌘ Enter to commit.

Branches

The branch manager lets you:

  • create a branch with New Branch,
  • switch with Checkout,
  • combine work with Merge into Current, and
  • replay your work with Rebase Current onto Selected.

If a merge or rebase stops partway, use Abort Merge/Rebase to back out.

History

  • Open the commit graph from the Source Control header to see how branches relate.
  • The history list shows past commits for the repository.
  • From any file, use Open Git History of this File to see just that file's commits.

Blame

In the editor, use the blame toggle in the file toolbar, or click the line numbers, to see who last changed each line. Use Reveal in File Tree to jump from a file back to its place in the explorer.

A good habit

Treat every agent run the way you would a colleague's pull request: read the diff before you commit.

Esc

Type to search the docs.