Review changes

Review shows the uncommitted changes in a session's git repository and the diff of each file. From it you can stage, discard and commit files, and send a comment on a line to the agent.

What you need#

  • The helper on the machine. Without it, a session has no Changes button.
  • A session whose folder is inside a git repository. Otherwise Review says "Not a git repository".

Open it#

  • In a session, tap Changes in the top bar. Its badge counts the changed files.
  • In the session list, open a session's menu and choose Changes.
  • In the chat, tap a changed file's name to open its diff.

In a compact window Review covers the screen. In a wider window it opens as a sheet, with the list in a sidebar beside the diff when there is room.

The changes list#

Files are grouped under Staged, Not staged, Untracked and Conflicts. Each row shows the file's name, its folder and what changed, such as Modified, Added, Deleted or Renamed. The header gives the number of changed and staged files, and how far the branch is ahead of or behind its upstream.

  • Swipe right on a row to stage or unstage it, or use Stage all and Unstage all on a section.
  • Swipe left to discard. Discard puts the file back as it was in the last commit. A file that was never committed is deleted and cannot be recovered, and Togo asks before it does that.
  • Touch and hold a row for all of its actions.

A file's diff#

Tap a file to open its diff. The diff shows one file at a time.

  • Choose Unified or Side by side in View options, and turn on Wrap lines there. Side by side needs a wide window.
  • Previous change and Next change step through the file's changes.
  • Stage, unstage or discard the file from the diff.
  • Touch and hold a line, then choose Comment on line. Togo pastes your comment into the session's input as path:line: comment and does not press Return, so you can read it before you send it. The session has to be open to send it.

Commit#

Stage the files you want, then tap Commit and write a message, with a summary on the first line. Amend the last commit replaces the previous commit, and Togo warns you when that commit is already pushed.

Commits from Togo skip git hooks and signing. Git needs your name and email set on the machine.

History, Files and Ports#

Review has three more tabs. History draws the branch's commits as a graph, and you can pick another branch at the top; open a commit to see each file with its lines added and removed, and its diff. Files shows the session's folder as a tree, with a letter on each changed file and a dot on each folder that holds one. Ports, when the helper lists them, previews servers the machine is running.

Limits#

  • The changes list has no line counts. Line counts appear on a commit's files in History.
  • A session Togo did not start shows its changes read-only.
  • An older helper can show changes but not stage or commit. Update it to change files from the app.
  • A diff larger than 512 KB shows only its first 512 KB.
  • Binary files are not shown as a diff.
  • When too many files changed, the list shows only some of them, and you stage and discard files one at a time.
  • A file that uses a git filter, such as Git LFS, has to be staged at your desk.
  • A rename that only changes letter case can't be undone from the app.