Tools
Source control
Stage, commit, branch, sync, resolve conflicts and browse history in the Source Control panel, and how agex runs git.
The Source Control panel, on the right side, is modeled on VS Code's Git view. Press ⇧⌘G to open or close it.
Changes
Your changes are listed in three sections: Merge Changes, Staged Changes and Changes. Show them as a list or a tree; git.changes_view sets which one the panel starts with.
Stage, unstage, discard or open a file from its hover buttons or its right-click menu. The right-click menu also has:
- Open the HEAD version.
- Add to
.gitignore. - File history.
- Copy path.
- Reveal in Finder.
Click a file to open its diff in a tab. See Diff tabs to stage or discard single hunks and lines.
Each agent's row in the sidebar shows the lines it has changed since it started (+48 −12). Click them to review those changes here.
Commit
Write a commit message in the box. It can span several lines: ↵ adds a line and ⌘↵ commits.
The commit menu covers:
- Commit staged
- Commit all
- Amend
- Commit & push
- Commit & sync
- Skip hooks
- Sign off
- Undo last commit
With git.smart_commit on (the default), committing with nothing staged commits all your changes.
Write the message with an agent
With Claude Code or Gemini CLI installed, the pen button writes the commit message from your diff.
To use another tool, set git.commit_message_command. The command gets the prompt as its last argument and the diff on stdin, and prints the message. Left empty, agex uses claude -p, or else gemini -p.
{
"git": {
"commit_message_command": "codex exec",
// or: "llm -m gpt-4o"
},
}git.commit_message_prompt replaces the prompt. Left empty, it asks for a summary line of at most 72 characters and, if needed, a short body.
Branches and sync
- Checkout: type to filter the branches, or type a new name to create one.
- Create a branch from any ref, and rename, delete, merge, rebase or publish branches.
- Sync, with ahead and behind counts.
- Pull (merge or rebase), pull from, push, push to, force push with lease, fetch and fetch all.
git.pull_mode sets what Pull and Sync do: "default" runs a plain git pull, so your git config decides, or choose "merge" or "rebase". To fetch in the background, set git.auto_fetch_minutes to a number of minutes (0, the default, never fetches).
Remotes, tags and stashes
- Remotes: add and remove them.
- Tags: create, delete and push them.
- Stashes: stash your changes, optionally including untracked files, or only what's staged. Then apply, pop, view or drop a stash. Click a stash to open its diff.
Conflicts
When a merge, rebase, cherry-pick or revert stops on conflicts:
- Accept the current or incoming version of each file.
- Mark the files resolved.
- Continue, skip or abort the operation.
History
The History view draws a commit graph with incoming and outgoing commits, and lets you search commits and see a file's history.
- Uncommitted changes sit on top as a dashed node.
- HEAD is a ring.
- Each merged branch is drawn as a colored bracket, with its branch name in the same color.
Every commit is listed. Older ones load automatically as you scroll to the end, git.history_page_size (300 by default) at a time. Click a commit to open its diff.
Authors show their real avatar: their GitHub account first, then Gravatar, with initials as the fallback. Avatars send hashed author emails to Gravatar and ask GitHub's API about the repository; turn off git.avatars to show initials only.
Right-click a commit to:
- Checkout, branch or tag from it.
- Cherry-pick or revert it.
- Reset to it: soft, mixed or hard.
- Copy its hash or message.
Clone a repository
Clone a repository into a folder, and agex opens it as a project. You can start a clone from the panel or from the command palette (⇧⌘P).
How agex runs git
agex runs your own git, with your login shell's PATH. Commit hooks (husky, lint-staged, …), credential helpers and your git config behave the same as in your terminal.
Background git never waits on an interactive password prompt. If a remote needs one, the operation fails and git's error appears in the panel. Remote operations rely on your SSH agent or credential helper.