Docs / Branches & pull requests
Give the work its own branch
Work can run in a copy of your repository instead of the folder you're editing in. Nothing it does shows up in your working tree until you merge it.
When you want this
- The work should end in commits. A branch and a pull request you review, rather than changes appearing under your hands.
- Two things run against the same repository. Sharing one folder means they overwrite each other. Separate copies keep them apart.
For a small fix that lands in seconds, skip it — a branch is overhead you don't need.
Turning it on
Ask your coding agent to run the work on a branch of its own. Everything else is chosen for you.
Where the branch lives
- The copy sits in
~/.oga/worktrees/, outside your project, so it never turns up in a search of your repository. - The branch is named after the work, under
oga/, and is created the moment the work starts. - It starts from wherever your repository is right now, unless something else is named.
- Work that waits on other work gets its copy only when it starts. Name the branch the earlier work commits to, and the next copy starts from its newest commits, even ones pushed from somewhere else. That lets each branch in a chain build on the one before it.
Everything else — the files it may touch, what it knows about the project, who does the work — stays tied to your original repository, so this is approved exactly like any other work on that project.
After it finishes
The copy stays put. Review the branch from your own repository and merge it, or archive the task when you are finished:
git log oga/<branch-name>
git merge oga/<branch-name>
Work on its own branch can also commit, push, and open a pull request for you. When it does, the link comes back with the rest of the report.
Commits it creates end with a Co-Authored-By: trailer, so git credits the run. Turn the stamp off for a project with worker: attribution: false in .oga.yaml, or everywhere with the same key in ~/.oga.yaml.
Archive the task and branch
Archive keeps the branch by default. When the work is finished and you also want to remove that local branch, ask Oga to do it safely:
oga archive <task-id> --delete-branch
Git's safe delete refuses branches with unmerged commits or another checkout. Uncommitted work keeps the checkout and branch. The task still archives, and the result tells you what stayed. The Oga app offers the same action from the task menu after confirmation.
Freeing the space
oga cleanup shows what old work is holding on disk and deletes nothing until you say so. To delete, use oga cleanup --older-than 30d --delete. Only finished, archived work is eligible. Cleanup can remove a clean task copy, but the branch remains.