Skip to content

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.

At the top of every thread view, the branch bar displays:

  • The current branch name (e.g. add-login-page)
  • Your local git username

This is a quick confirmation that you’re on the right branch before committing.

The Git Ops button in the top toolbar opens a dropdown menu with all git operations. The button also shows a status indicator:

  • No dot — no uncommitted changes
  • Orange dot — uncommitted changes exist
  • Green dot — changes committed but not yet pushed
OperationDescription
CommitStage all changes and commit with a message
PushPush the current branch to origin
FetchFetch from origin to see if the remote has new commits
Sync BranchPull the latest changes from the default branch via rebase
Revert FileRestore a specific file to its last committed state
CheckpointSnapshot current changes so they can be restored later
View DiffOpen the diff viewer to review all changes
Git HistoryView the commit log for this branch
Create RepoCreate a new GitHub repository from this thread

  1. Click Git Ops → Commit.
  2. The commit dialog shows the number of changed files.
  3. Enter a commit message, or click Generate to have the AI write a conventional commit message based on the diff.
  4. Click Commit.

All modified and new files are staged automatically (git add -A) before committing.

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.


  1. Click Git Ops → Push.
  2. Tarsk runs git push -u origin <branch> to push the branch and set the upstream tracking reference.
  3. 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.


Click Git Ops → Fetch 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.


If the thread doesn’t have a remote origin yet (e.g. you scaffolded a new app), you can create a GitHub repository directly:

  1. Click Git Ops → Create Repo.
  2. Enter the repository name and visibility (public/private).
  3. 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.


Click Git Ops → Git History 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.


Click Git Ops → Sync Branch 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:

  1. Pushes any unpushed commits on your thread’s branch first (if the branch has diverged)
  2. 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.


If the agent made changes to a file that you want to undo, you can revert just that file without affecting other changes:

  1. Open the Review tab (or Git Ops → View Diff).
  2. Find the file you want to revert.
  3. 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.


A checkpoint is a snapshot of the working tree at a point in time. Checkpoints let you save your current state before asking the agent to make risky or experimental changes, and then restore back to that state if the results are not what you wanted.

Checkpoints are created automatically by the agent before it begins making changes. They can also be triggered manually from the UI. The checkpoint uses git stash internally, so it captures both tracked and untracked changes without committing them.

If the agent’s changes are unsatisfactory, you can restore a previous checkpoint:

  1. Click Git Ops → Restore Checkpoint.
  2. Select the checkpoint to restore (each is labeled with the message ID it was created before).
  3. Tarsk discards all current working tree changes and applies the checkpoint’s snapshot.

This is a destructive operation — all uncommitted changes since the checkpoint will be lost.


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 manually
  • pull-request — after committing and pushing, automatically creates a GitHub pull request (see Review & Pull Requests)

Change this in Project Settings.