Git and pull requests
Give every task its own branch, review the diff and open a pull request without leaving ADE.
On this page
A branch for every task#
When you open a repository with Isolated workspaces, or clone one, each new task gets its own branch and its own worktree: a second copy of the repository on disk. Tasks can run at the same time without touching each other or your main checkout.
- A new task branches from the repository’s default branch.
- New task from branch starts from a remote branch or an open pull request instead.
- The branch you start from is the task target. Changes and pull requests compare against it.
- Change the target from the menu next to the branch name in the chat header.
- A repository you chose to edit directly has no worktrees. Every task works in that folder.
When the target can change
Not while the agent is running or a pull request is open. If the task has no changes yet, ADE moves it to the new target right away.
Review before you ship#
The Changes tab shows the task’s diff against its target. Comment on it yourself, ask for an AI review or get a second opinion from Codex. Reviews run in their own chat.
| Review | How |
|---|---|
| Your comments | Click + in the diff gutter next to a line or range, write in Add a comment for the AI and choose Comment. |
| AI review | Click Review in the right panel header. A new chat reviews the diff and adds its findings to it. |
| /codex-review | Gets an independent Codex review of the same changes, when Codex is connected. |
| /codex-challenge | Asks Codex to argue against the approach. |
| /security-review | Checks the branch’s pending changes for security problems. |
Comments go with your next message
There is no separate send button. Pending comments attach to your next normal message in that chat, not to a slash command or a queued message.
Checks and pull request status#
- The Checks section of the Git tab shows CI results for the branch.
- When checks fail, choose Fix errors to send the failures to the agent.
- Status rows show where the pull request stands, such as Waiting for PR review or PR changes requested.
- On PR changes requested, Add comments to prompt gives the reviewer’s comments to the agent.
Open and merge a pull request#
Pull request actions sit in the right panel header. They run through the GitHub CLI, so they use your gh sign-in and its permissions.
| Action | What it does |
|---|---|
| Commit & Push | Stages everything, commits with your message and pushes. |
| Push / Pull | Pushes to or pulls from the branch’s remote. |
| Create PR | Opens a pull request against the task target. |
| Create draft PR | Opens it as a draft. Mark it ready later from the same menu. |
| Create PR manually | Opens GitHub’s pull request page in your browser. |
| View PR | Replaces Create PR once a pull request is open. |
| Merge | Squash-merges the open pull request. |
| Auto-merge | Turns GitHub auto-merge on or off. |
| Resolve conflicts | Asks the agent to resolve merge conflicts on the branch. |
After the merge
The right panel offers Continue or Archive. Continue starts a fresh branch in the same task and keeps its chats. Archive closes the task.
Answer review comments#
While a pull request is open, the Git tab lists review threads that still need an answer. Resolved and outdated threads are hidden.
- Open a thread to jump to that comment on GitHub.
- Add the threads to the chat, and the agent works through them.
- The list refreshes when the agent finishes.
What you need#
- A Git repository with a remote for push and pull request actions.
- The GitHub CLI signed in. ADE asks once if it is not.
- Code mode. VideoDraft mode hides the Git controls.
While a chat in the task is running, ADE turns off actions that change the repository. This only affects that task.