Work with Git

Editor

Work with Git

Review changes, stage hunks or lines, write commits, and use repository operations without leaving Red.

Open the Git workspace

Press Space G. The file list groups staged, unstaged, untracked, and conflicted paths. The detail pane follows the selected file and shows its diff.

Use Tab or Ctrl-w w to switch panes. Press ? or F1 for the actions available in the focused pane.

Review and stage changes

KeysAction
[h, ]hMove between hunks
vSelect changed lines
s, u, xStage, unstage, or discard the selected line or range
S, U, XStage, unstage, or discard the current hunk
WToggle diff wrapping
LOpen the complete patch in a scratch buffer

Discard operations ask for confirmation. Git authentication uses your existing SSH agent or credential helper.

Create a commit

Press Space c c to open the commit editor. Its first lines show the current branch and staged files. Write the message, then use :w or :wq to submit it. :q cancels.

The commit menu can draft a message from the staged diff when Codex is installed and authenticated. Red places the draft in the editor so you can change it before committing.

Use repository operations

The workspace also exposes fetch, pull, push, branches, remotes, tags, stashes, worktrees, logs, reset, and interactive rebase. Open the action list with ? instead of memorizing every binding.