Using the workspace

Git, commits and pull requests

Review a session's changes, commit with an AI-suggested message, push, open a GitHub pull request and merge after your checks pass, all from the Duscode Git dialog.

Open Git with the branch button in the top bar, or press Ctrl/⌘+Shift+G, to work with the current session's changes. It opens as a dialog over the chat; Esc closes it. Duscode uses your own git and your own identity, and it's never destructive: no force pushes, resets or stashes.

Review changes

The Git dialog lists the session's uncommitted changes, like git status:

  • a letter for each file: M modified, A added (including new, untracked files), D deleted, R renamed, ! conflict
  • lines added and removed (bin for binary files)
  • for isolated sessions, how many commits the branch is ahead of its base, such as 2 commits ahead of main

Click a file to compare it with the last commit in a side-by-side diff.

Commit

Click Commit N files. The fast model reads the diff and suggests a message. Edit it in the Commit changes dialog, then click Commit (or press Ctrl/⌘+Enter). Duscode stages every changed file and commits on the session's branch under your git identity.

If git doesn't know who you are, Duscode won't guess an identity from your machine's name. It shows the two commands to run once:

bash
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

You can't commit while Dus is working in the session.

Push

Push (N) pushes the branch to your remote with git push -u. It's never forced. If the remote has commits you don't, the push is rejected, and Duscode explains how to bring them in.

No remote yet? Add one, for example a GitHub repository as origin. Or create the project with Also create on GitHub.

Open a pull request

Open pull request appears for an isolated session with commits, when the remote is on GitHub. Duscode pushes the branch, then runs gh pr create:

  • Title: the commit's subject if there's one commit, otherwise the session's title
  • Body: the list of commits and the session's journal, so reviewers see what was done and why

If a pull request for the branch already exists, you get its link. Commit any changes first, so the pull request contains them.

Pull requests need the GitHub CLI, signed in once with gh auth login. Duscode tells you if it's missing or signed out. Duscode stores no GitHub token.

Merge

Merge into main (or whatever the session's base branch is) merges an isolated session locally:

  1. The project's checks run in the session's worktree. If a check fails, nothing is merged. You can Ask Dus to fix it.
  2. Duscode runs git merge --no-ff in your main checkout, with the message Merge session "title" (branch).
  3. If there's a conflict, the merge is undone (your checkout was clean, so nothing is lost) and the conflicting files are listed. Resolving them is your call. Ask Dus to help resolve hands it to Dus as an ordinary request, with approvals.

Merging needs:

  • no uncommitted changes in the session
  • something to merge
  • your main checkout on the base branch, with no uncommitted changes
  • a git identity
  • no task running

Duscode lists anything missing under Not merged yet.

Finish… (session menu, or the strip above the message box when a session is Done) does all of this in one go: it brings the base branch in, runs every check on the merged result, then merges or opens a pull request and removes the worktree and branch. See Finishing a session.

Asking Dus to do git

Dus can run git commands itself through its command tool, with your approval. The command blocklist stops force pushes even then. The Git view is the quicker path for the usual steps.

Coming soon

Dus proposing the commit, pull request or merge itself at the end of a task, and an update from main button. See Coming soon.

Something missing or wrong? Email support@duscode.com.