Git Operations
Every thread is a full git clone on its own branch. Tarsk provides a built-in Git Ops panel so you can commit, push, and fetch without leaving the app.
Branch and Git User
Section titled “Branch and Git User”The branch button in the chat toolbar shows the current git branch name (e.g. add-login-page). Click it to switch branches, create a new branch, or rename the current one.
Your git username appears in the Git Ops dropdown menu under User.
The Git Ops Button
Section titled “The Git Ops Button”The Git Ops control in the chat toolbar is a split button. The main button label changes with git state (Commit, Create PR, etc.). The chevron opens a dropdown with additional actions.
Thread status dots appear in the sidebar next to each thread name:
- Brand dot — uncommitted local changes
- Orange dot — an open pull request exists (or needs updating)
- No dot — clean working tree, no active PR indicator
Main Button Actions
Section titled “Main Button Actions”The primary button adapts to your branch state:
| Label | When it appears |
|---|---|
| Commit | Uncommitted changes exist |
| Create PR | Committed and pushed, no open PR yet |
| Merge PR | An open pull request exists and is ready to merge |
Dropdown Operations
Section titled “Dropdown Operations”| Operation | Description |
|---|---|
| Sync with {branch} | Rebase your branch onto the latest default branch |
| Quick Commit | Generate an AI commit message and commit in one step (Cmd+Shift+C) |
| 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 (Cmd+Shift+P) |
| Create Repo | Create a new GitHub repository from this thread |
| View in GitHub | Open the repository on GitHub (Cmd+Shift+G) |
Use the Review tab 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 (or Quick Commit in the dropdown).
- The commit dialog shows the number of changed files.
- Enter a commit message, or click Generate to have the AI write a conventional commit message based on the diff.
- Click Commit.
All modified and new files are staged automatically (git add -A) before committing.
AI-Generated Commit Messages
Section titled “AI-Generated Commit Messages”The Generate button sends the current diff to the AI model and returns a commit message following the conventional commits format (e.g. feat(auth): add JWT refresh token endpoint). You can edit the generated message before committing.
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. Use this to check whether the remote has new commits before pushing.
Creating a GitHub Repository
Section titled “Creating a GitHub Repository”If the thread doesn’t have a remote origin yet (e.g. you scaffolded a new app), you can create a GitHub repository directly:
- Click Create Repo in the Git Ops dropdown.
- Enter the repository name and visibility (public/private).
- Click Create.
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 (short)
- Commit message
- Author name
- Date
This is useful for reviewing what the agent has committed across a long work session, or for finding a previous state you want to return to.
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 thread’s branch using rebase. This keeps your feature branch up-to-date with the latest work on the default branch without creating a merge commit.
Sync Branch automatically:
- Pushes any unpushed commits on your thread’s 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, you will need to resolve them manually. Open the thread directory in your IDE to handle conflicts, then continue the rebase.
Reverting a Single File
Section titled “Reverting a Single File”If the agent made changes to a file that you want to undo, you can revert just that file without affecting other changes:
- Open the Review tab.
- Find the file you want to revert.
- Click the Revert button on that file’s diff.
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). Checkpoints capture both tracked and untracked changes without committing them.
Restoring a Checkpoint
Section titled “Restoring a Checkpoint”If the agent’s changes are unsatisfactory, restore the state from before that message:
- Find the user message in the chat that triggered the run.
- Click Restore checkpoint on that message.
- Confirm in the dialog. Tarsk discards all working tree changes since that checkpoint and truncates the conversation back to that point.
This is destructive — all uncommitted changes and conversation messages since the checkpoint are lost. The conversation history is reloaded from the database after truncation.
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Action | Shortcut |
|---|---|
| Open Git Ops menu | Cmd+Shift+B |
| Quick Commit | Cmd+Shift+C |
| Create Pull Request | Cmd+Shift+P |
| View in GitHub | Cmd+Shift+G |
Quick Commit only appears when uncommitted changes exist and auto-generate commit messages is enabled. Create Pull Request requires commits ahead of the default branch with no open PR.
Commit Method
Section titled “Commit Method”Whether changes are committed directly to the branch or converted into a pull request is controlled by the project’s Commit Method setting:
direct— commits and pushes to the thread’s branch; you handle PRs manuallypull-request— after committing and pushing, automatically creates a GitHub pull request (see Review & Pull Requests)
Change this in Project Settings.