Skip to content

Use Git in Compass Code to follow an agent’s edits from a local diff through a pull request. Git runs on the paired computer, so access to the repository, remotes, and GitHub depends on that computer’s configuration and your device’s permissions. Available actions vary by client and repository.

Start a new chat in a Git project and pick a Project folder or New worktree where offered. The project folder uses the existing checkout and shares its uncommitted work. A new worktree starts from a Git commit in a separate checkout. Use one for parallel tasks, testing a change independently, or keeping the files in your editor separate from the agent’s edits.

Open the project’s Git view or a chat’s Repository view to see branch status, worktrees, commits, and pull requests where supported. Confirm the branch and folder before running a check or publishing. A worktree has its own working files even when it belongs to the same repository.

  1. Open Changes from the chat. Use the turn’s diff for one edit and the chat-level diff for the accumulated work.
  2. Check the working tree too. It can contain staged, unstaged, or untracked changes, including edits from another chat or your editor. Open individual files to inspect the patch.
  3. Use Repository or Commit history to see what was already committed. Open a commit to inspect its changes and use the branch or worktree view to check the base when you compare separate pieces of work.

Git checkpoints support Revert for eligible chat work. Read the proposed scope before confirming. Compass can refuse a revert that would overwrite unrelated edits. A revert in a chat does not undo a push or merge on the remote.

From an administrator’s browser session, open Settings → Projects and save the project’s check command. Native clients can expose project commands in the paired computer’s settings as well. Use the command your project already relies on, such as npm run check if it defines that script.

From the chat’s Git controls, choose Run check where shown. It runs in the chat’s workspace, so the result belongs to that checkout. Review the result before publishing. Use the terminal if you need to reproduce a failure interactively or run a different command.

  1. Open the chat’s Git controls and verify your branch, changed files, and any changes attributed to other work. Review what is included and leave unrelated edits out of the commit.
  2. Write a commit message. If Suggest is offered, it can use the diff to propose a message. Read and edit it before committing.
  3. Choose Commit to save locally or Push to publish the branch. The browser also offers Commit & push and Open pull request where supported. Opening a pull request from the browser can commit changes and push first, so review the selected files and destination.
  4. Read the outcome for each step. A successful commit can remain on the host even if pushing or opening the pull request fails.

Review pull requests and recover uncertain actions

Section titled “Review pull requests and recover uncertain actions”

Open a linked pull request or select it from the repository’s pull request list. Check its base and head, changes, reviews, and checks. With compatible hosts and GitHub access, native clients can offer comments, approval, requests for changes, and merge methods such as Squash and merge. Repository permissions and protections still govern what succeeds. If the head changes, refresh the pull request and review the new commit before merging again.

If the chat offers Watch this pull request, use it to follow changes in review or check status from the chat. Open the pull request itself before deciding whether to merge.

When an operation reports Outcome unknown or the connection drops mid-action, inspect the repository or pull request first. Use the existing recovery or status action when available. Check the branch, commit, or pull request before starting a separate attempt.

To break a project change into isolated implementation and review tasks, see Orchestration and Navigator.