Git Operations
Git operations use the active thread’s checkout and current git branch. Tarsk provides a Git Ops control in the chat dock footer so you can commit, push, and fetch without leaving the app.
The Git Ops Button
Section titled “The Git Ops Button”Git Ops sits in the bottom-left of the chat footer. It is a split button: the main label changes with git state (Commit, Create PR, etc.), and the chevron opens a dropdown with additional actions.
Status dots in the branch picker indicate:
- Brand dot — uncommitted local changes
- Orange dot — an open pull request exists (or needs updating)
- Animated dot — agent is processing in that workspace
Main Button Actions
Section titled “Main Button Actions”| Label | When it appears |
|---|---|
| Commit | Uncommitted changes exist; clicking generates a message and commits immediately |
| Update PR | Unpushed commits while a pull request is open |
| Open PR | An open pull request exists; opens it on GitHub |
| Create PR | Commits ahead of the default branch, no existing PR; pushing first is optional |
| Sync | No uncommitted changes and the branch is behind the default |
Dropdown Operations
Section titled “Dropdown Operations”| Operation | Description |
|---|---|
| Sync with {branch} | Rebase your branch onto the latest default branch |
| Fetch | Download remote updates without merging |
| Pull | Pull latest changes from the remote branch |
| Push Branch to Remote | Create the remote branch and push (when no remote branch exists) |
| Push Commits | Push unpushed commits to the remote branch |
| History | View the commit log for this branch |
| Create Pull Request | Open the PR creation dialog (⌘⇧P) |
| Create Repo | Create a new GitHub repository from this branch |
| View in GitHub | Open the repository on GitHub (⌘⇧G) |
Use the Review dock panel to view diffs and revert individual files. Checkpoints are created automatically before agent runs and restored from the chat message header — not from this menu.
Committing Changes
Section titled “Committing Changes”- Click Commit on the Git Ops button. Tarsk generates a commit message from the diff and commits immediately — no dialog or extra step.
- A success message confirms the commit and shows the generated message.
All modified and new files are staged automatically (git add -A) before committing. You can also auto commit with ⌘⇧C.
If you pull with uncommitted changes and choose Commit first, a commit dialog opens with an AI-generated message you can edit before committing.
AI-Generated Commit Messages
Section titled “AI-Generated Commit Messages”Commit messages are generated by default: the current diff is sent to the AI model, which returns a conventional commit message (e.g. feat(auth): add JWT refresh token endpoint). In the commit dialog you can edit the generated message or click Generate to regenerate it.
Pushing Changes
Section titled “Pushing Changes”- Click Push Commits or Push Branch to Remote in the Git Ops dropdown.
- Tarsk runs
git push -u origin <branch>to push the branch and set the upstream tracking reference. - A success message confirms the push.
If the push fails because the remote has commits you don’t have locally (non-fast-forward), run Fetch first, then resolve any conflicts before pushing again.
Fetching from Origin
Section titled “Fetching from Origin”Click Fetch in the Git Ops dropdown to run git fetch origin. This updates your local knowledge of what’s on the remote without modifying your working tree or current branch.
Creating a GitHub Repository
Section titled “Creating a GitHub Repository”If the workspace doesn’t have a remote origin yet (e.g. you scaffolded a new app):
- Click Create Repo in the Git Ops dropdown.
- Enter a Repository Name (optional), a Description (optional), and the Visibility (public or private).
- Click Create & Push.
Tarsk runs gh repo create --source . --push, which creates the repository on GitHub, sets it as the remote origin, and pushes the current branch.
Viewing Git History
Section titled “Viewing Git History”Click History in the Git Ops dropdown to open a log of commits on this branch, showing commit hash, message, author, and date.
Syncing with the Default Branch
Section titled “Syncing with the Default Branch”Click Sync with {branch} in the Git Ops dropdown to pull the latest changes from the default branch (usually main or master) into your workspace’s git branch using rebase.
Sync automatically:
- Pushes any unpushed commits on your branch first (if the branch has diverged)
- Runs
git pull --rebase origin <default-branch>to replay your commits on top of the latest default branch
If rebase conflicts occur, resolve them manually in your IDE, then continue the rebase.
Reverting a Single File
Section titled “Reverting a Single File”- Open the Review dock panel.
- Find the file you want to revert.
- Right-click the file in the list and choose Revert Change.
Tarsk restores the file to its last committed state (HEAD). For untracked or newly staged files, the file is deleted from disk entirely.
Checkpoints
Section titled “Checkpoints”A checkpoint is a snapshot of the working tree before an agent run. Tarsk creates one automatically before the agent starts making changes (using git stash internally).
Restoring a Checkpoint
Section titled “Restoring a Checkpoint”- Find the user message in the chat that triggered the run.
- Click Restore checkpoint on that message.
- Confirm in the dialog.
This is destructive — all uncommitted changes and conversation messages since the checkpoint are lost.
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Action | Shortcut |
|---|---|
| Open Git Ops menu | ⌘⇧B |
| Auto Commit | ⌘⇧C |
| Create Pull Request | ⌘⇧P |
| View in GitHub | ⌘⇧G |
Auto Commit only runs when uncommitted changes exist. Create Pull Request requires commits ahead of the default branch with no open PR.
Commit Method
Section titled “Commit Method”Whether changes go through pull requests is controlled by the project’s Commit Method setting in Project Settings:
- Pull Request — feature branches and PR workflow via
gh - Direct — commits and pushes to the branch directly