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.
The Branch Bar
Section titled “The Branch Bar”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
Section titled “The Git Ops Button”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
Available Operations
Section titled “Available Operations”| Operation | Description |
|---|---|
| Commit | Stage all changes and commit with a message |
| Push | Push the current branch to origin |
| Fetch | Fetch from origin to see if the remote has new commits |
| View Diff | Open the diff viewer to review all changes |
| Git History | View the commit log for this branch |
| Create Repo | Create a new GitHub repository from this thread |
Committing Changes
Section titled “Committing Changes”- Click Git Ops → Commit.
- 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 Git Ops → Push.
- 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 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.
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 Git Ops → Create Repo.
- 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 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.
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.