Docs › Using the editor › Git: commit messages, branch review and conflicts
Git: commit messages, branch review and conflicts
Write a commit message from what you staged, review your branch before you open a pull request, resolve merge conflicts in the chat, and mark the agent's commits.
On this page
- Write Commit Message
- Review This Branch
- Resolve Conflicts in Chat
- Marking the agent's commits
- If something goes wrong
AstraCode uses the editor's built-in Git support and adds four things to it. None of them commits or pushes for you: you stay in charge of history.
Write Commit Message
Writes a commit message for what you have staged, in the style of your repository's recent history.
- Stage the changes you want to commit, in the Source Control view.
- Choose the Write Commit Message button in the commit message box, or run AstraCode: Write Commit Message.
- The view shows Writing a commit message, then the message appears in the box. It replaces whatever was there; Cmd+Z (Ctrl+Z) brings your text back.
- Edit it if you like, and commit as usual.
- It reads only the staged diff, never unstaged changes, plus the subjects of your last 15 commits to match their style.
- A staged diff over 60,000 characters is cut on a line boundary, and the full list of staged files is sent with it.
- It never commits.
| Message | What to do |
|---|---|
| Nothing is staged. Stage the changes you want to commit first. | Stage something, then try again. |
| No git repository is open, or the built-in Git extension is disabled. | Open a folder that is a git repository, or turn the Git extension back on. |
| Sign in to AstraCode to write commit messages. | Run AstraCode: Sign In. |
| Could not write a commit message: followed by a reason | The reason says why. Report this sends a report. |
Review This Branch
Reviews everything on your branch since it left the main line, before anyone else has to. Findings arrive while the code is still in front of you.
- Choose Review This Branch in the Source Control view's title bar, or run AstraCode: Review This Branch.
- With several folders open, the review is of the repository holding the file you are in. With no file open, it asks Which folder?
- A review runs in the chat, titled
Review this branch against <base>, so you can follow what it reads. - Findings land in the Problems panel, from AstraCode review, on the lines they are about. Serious ones are warnings; the rest are information.
It compares against the point where your branch left its base, trying in order: the branch's upstream, the remote's default branch, origin/main, origin/master, main and master. Uncommitted changes are included. Up to 120,000 characters of diff are sent, with the full list of changed files.
| Message | What it means |
|---|---|
| Could not work out what to compare against. Is this a git repository with a main branch? | None of the bases above exists. Fetch from your remote, or create a main branch. |
Nothing has changed since <base>. | Your branch has no changes against its base. |
To review only what the agent just changed, use Find Issues in Agent Changes instead; see Reviewing the agent's changes. From a terminal or CI, see Reviewing a branch.
Resolve Conflicts in Chat
When a file has merge conflict markers, a Resolve Conflicts in Chat button appears in the editor's title bar.
- Open the conflicted file and choose Resolve Conflicts in Chat, or run AstraCode: Resolve Conflicts in Chat.
- The file is saved first, so the agent reads what you see.
- The agent resolves each conflict in Agent mode, in a run titled
Resolve conflicts in <file>, asking before it edits as usual. - Review the result like any agent change, then stage and commit it yourself.
In a file with no conflict markers it says No merge conflicts in this file. The button does not appear in the editor's three-way merge editor.
Marking the agent's commits
When the agent commits for you, you can have it say so in the commit. Turn on Co-author agent commits in AstraCode Settings, Git & PRs (astracode.git.attributeCommits, off by default). Each commit the agent makes then carries this trailer:
Co-Authored-By: AstraCode <agent@astracode.io>
It is off by default because a trailer is written into a permanent record, and some teams reject commits with trailers they do not expect.
The agent always asks before it pushes, publishes a package or rewrites published history, whatever your approval setting. See Approvals and permissions.
If something goes wrong
- The Write Commit Message button is missing. It appears only for a git repository, with the built-in Git extension on.
- Review found nothing in my second repository. The review is of the repository holding the file you have open. Open a file from the other one first.
- The resolve button is missing. It shows only while the file has conflict markers, and not in the merge editor.
More in Agent run problems.
← Reviewing the agent's changes Dictation →
All documentation
Get started
Using the editor
- Tab completion
- Edit and ask about a selection
- Reviewing the agent's changes
- Git: commit messages, branch review and conflicts
- Dictation
- Layout, themes and the settings page
Agent
- Agent overview
- Agent, Plan, Ask and Debug
- Approvals and permissions
- Plan mode
- Debug mode
- Tools
- Browser tools
- How the agent checks its work
- Checkpoints and undo
- Running several agents at once
- Subagents and background tasks
- Remote agents in GitHub Actions
- Infrastructure as code
Context
Workspaces
Connectors
- Connectors (MCP servers)
- Connector configuration reference
- Use AstraCode from Claude, ChatGPT and other apps
Extending AstraCode
CLI
Account and usage
- Usage and limits
- Bring your own key
- What AstraCode sends and keeps
- Reporting a problem and getting help
Troubleshooting
- Troubleshooting
- Sign-in problems
- Install and update problems
- Chat panel problems
- Agent run problems
- Connector problems
- Dictation problems
- Usage, billing and network errors
- CLI problems