Files and Git

Diffs, merges and Git windows

Read the change in one file, resolve a merge conflict, read one commit and watch the Git commands that Orkestra runs, each in its own window on the canvas.

On this page

Purpose

Four kinds of canvas window show Git information. The diff window shows what changed in one file. The merge window lets you resolve a merge conflict in one file. The commit window shows one commit and its files. The Git console window lists the Git commands that Orkestra runs, with their output. Use them to review changes, to finish a merge and to see what Git did.

Where to find it

You open the windows from Source Control in the left sidebar (see Source control and Branches, log and shelf):

  • Diff window — double-click a changed file in the Commit tab (row tooltip "Double-click to view diff"). A file window can also open it (see "Open a diff from a file window").
  • Merge window — double-click a conflicted file in the Commit tab (row tooltip "Double-click to resolve conflict").
  • Commit window — double-click a commit in the Log tab (row tooltip "Double-click to open this commit").
  • Git console window — click the Git console button in the Commit tab.

A new window opens in the active workbench of the active project, large, in focus mode. Leave focus mode to see it on the canvas. The frame (move, resize, dock, focus, rename, close) is the same as for every window. See Canvas windows.

If the window for the same item is already open, Orkestra brings it to the front. The item is one file and one side (staged or not) for a diff, one file for a merge, one commit for a commit window. A workbench has one Git console window.

What you see

Title bar (all four windows, from left to right):

  • Status dot — a small dot at the left edge. Its colours are in "States and messages".
  • Window name — the name you set. The default is the file name for a diff and a merge window, the first seven characters of the commit hash for a commit window, and "Git console" for the console.
  • Focus button and Close button. The close tooltips are "Close diff", "Close merge", "Close commit" and "Close console".

Diff window (read-only):

  • Diff view — two panes. The left pane is the file in the last commit. The right pane is the newer version. Orkestra highlights the changed lines. Long lines wrap. The left pane of a new file is empty. The right pane of a deleted file is empty.
  • Path — the file path, at the left of the footer. Hover it to see the full path.
  • Mode name — "Side-by-side" or "Unified".
  • Side-by-side button and Unified button — icon buttons at the right of the footer. The tooltips are the same as the names. The active one is highlighted.

Merge window:

  • Resolving in worktree note — the text "Resolving in worktree" and the worktree name. It shows only when the file belongs to the worktree that Source Control targets.
  • Conflict list — one block for each conflict that is still open. A block has:
    • Conflict 1 (the number of the conflict).
    • Accept Current, Accept Incoming and Accept Both buttons.
    • Two boxes with text. The left box is the Current side (green tint). The right box is the Incoming side (red tint). The boxes have no label. An empty side shows "(empty)".
  • Result editor — the full text of the file, which you can edit. An open conflict sits between the marker lines <<<<<<< ours, ======= and >>>>>>> theirs.
  • Footer — the file path, a status text, the Reload button (an icon button with circular arrows, tooltip "Discard changes and reload from disk") and the Save & Stage button.

Commit window:

  • Commit header — the subject in large type. Below it: a round badge with the initials of the author, the author name, the short hash, the date in words (for example "2 hours ago") and the branch name, when the commit has one. The rest of the message follows, when there is one.
  • N changed files — a label with the file count. Below it is one row for each file. A row shows a status letter (A added, M modified, D deleted, R renamed), the file name, the path, and the number of added lines (+) and removed lines (−).
  • File diff — the diff of the selected row. The header shows the status letter, the file name and the path. At its right are the text "N differences", the Side-by-side button and the Unified button. In Side-by-side mode a label bar names the left pane "parent" and the right pane "this commit". Two panes with line numbers follow. The footer shows the totals (+ and −) and the mode name.

Git console window:

  • Clear button — an icon button with a trash icon, left of the Focus button (tooltip "Clear the git console").
  • Command list — one entry for each Git command, oldest at the top. An entry shows the time (hours, minutes, seconds), the sign "$", the command (for example "git status"), and how long it took in ms. The output of the command is under it. A command that failed has a red edge and a red command text. A successful one has a green edge. The list scrolls to the newest entry by itself.

How to

Open a diff from Source Control

Before you start, open Source Control in the left sidebar and click its Commit tab. The project must have a changed file.

  1. Double-click a file row in the Changes list.

Result: a diff window opens in focus mode and shows "Reading diff…" for a moment. A file that you ticked (staged) shows the staged version on the right. A file that you did not tick shows the file on disk on the right.

Open a diff from a file window

Before you start, make sure a file window shows the notice "This file changed on disk while you were editing".

  1. Click the Compare button in the notice.

Result: a diff window opens in focus mode. It compares the last commit with the file on disk.

Change between Side-by-side and Unified view

  1. Click the Unified button in the footer of the diff window.

Result: the diff shows as one column. Click the Side-by-side button to see two panes again.

Resolve a conflict with the buttons

Before you start, make sure a merge or rebase is in progress. Source Control then shows the banner "Merging — resolve conflicts, then continue" (or "Rebasing — resolve conflicts, then continue") and the Conflicts list.

  1. Double-click a conflicted file row in the Conflicts list.
  2. Read the two boxes of Conflict 1.
  3. Click Accept Current, Accept Incoming or Accept Both.
  4. Repeat steps 2 and 3 for each conflict that is still in the list.
  5. Check that the footer says "Resolved — save to stage".
  6. Click the Save & Stage button.

Result: Orkestra writes the file and stages it. The footer says "Saved". Source Control reads its status again. Accept Both puts the Current text first and the Incoming text after it.

Resolve a conflict by hand

  1. Click in the result editor of the merge window.
  2. Edit the text. Delete the marker lines and keep the text you want.
  3. Click the Save & Stage button.

Another way: press Ctrl+S (Cmd+S on macOS) while the cursor is in the editor.

Result: the status text shows "Saving…" and then "Saved". The note "No conflict markers — edit and Save & Stage." shows when no marker line is left.

Discard your choices in the merge window

  1. Click the Reload button in the footer.

Result: Orkestra reads the file from disk again. Every choice and edit is lost. No question comes first.

Open a commit window

Before you start, open Source Control in the left sidebar and click its Log tab.

  1. Double-click a commit row in the History list.

Another way: move to the row with the keyboard and press Enter.

Result: a commit window opens in focus mode and shows "Reading commit…" for a moment. Then the header and the file list show. The first file is selected.

Read the diff of one file in a commit

  1. Click a file row below N changed files in the commit window.
  2. Click the Unified button in the diff header to see one column.

Another way to select a file: move to its row with the keyboard and press Enter or Space.

Result: the diff of the file shows. The left pane is the file before the commit. The right pane is the file after it. The text "N differences" tells how many blocks of change the file has.

Open the Git console

Before you start, open Source Control in the left sidebar and click its Commit tab.

  1. Click the Git console button (a terminal icon, tooltip "Git console") in the toolbar above the changes list.

Result: the Git console window opens in focus mode. The button also works on a clean tree.

Clear the Git console

Before you start, click Exit focus (Esc) if the console is in focus mode. The Clear button is not in the focus title bar.

  1. Click the trash icon button (tooltip "Clear the git console") in the title bar.

Result: the list is empty. Every Git console window shows the same list, so all of them empty.

States and messages

  • Status dot colours — amber while loading, green when loaded, red on an error. In the merge window green means nothing is left to save, and the accent colour means unsaved changes. The Git console has a grey dot that does not change.
  • Focused… — the empty place on the canvas while the window is in focus mode.
  • Reading diff…, Reading conflict…, Reading commit…, Reading file… — the window loads (the last one: a file inside a commit).
  • Cannot show this diff, Cannot open this conflict, Cannot show this commit — the read failed. The next line gives the reason, or a general text ("The diff could not be read.", "The file could not be read.", "The commit could not be read."). Click Retry to read again.
  • Cannot read file — one file of a commit failed to load. This message has no Retry button.
  • Binary file — no text diff to show. and File is too large to diff (over the 16 MiB limit). — Orkestra does not show these files.
  • Nested repository commit pointer — the file is a pointer to a nested repository. The window shows "Pinned commit:", the origin ("Nested repository origin:" or "Nested repository has no remote origin URL.") and two example Git commands as text.
  • N conflicts left (or 1 conflict left) — the merge window still has open conflicts. Resolved — save to stage — none is left and you did not save. Saving… and Saved — the save is running, or it is done.
  • Save errors — the status text turns red and shows the reason. Examples: "Could not locate this file in the project.", "The file no longer exists on disk.", "Refused: outside the project.", "Permission was denied while saving this file.", "File exceeds the 16 MiB limit.", "Could not stage the resolved file.", "Save failed."
  • No git operations yet — run one (stage, commit, shelve, fetch…) and it appears here. — the Git console list is empty.
  • …(truncated) — at the end of the output of a command, when the output was longer than 8 KiB.

Limits and tips

  • The diff window is read-only. It has no button to stage, unstage or revert. Use the Commit tab for that. See Source control.
  • No window has buttons to jump from one change to the next. The commit window only shows the count ("N differences").
  • The choice of Side-by-side or Unified is not saved. The same is true for the selected file in a commit window. Both go back to their start value (Side-by-side, first file) when you enter or leave focus mode, and when you reopen the window.
  • A diff window and a commit window read from the tree that Source Control targets when the window loads. The commit window compares each file with the first parent of the commit.
  • After you restart Orkestra, the diff, merge and commit windows come back and read their content again. The Git console comes back empty.
  • The merge window has two sides for each conflict. It has no pane for the common base version. If Git adds a common-base part to the markers, Orkestra does not show it and does not keep it when you save.
  • Save & Stage is active after any change. It writes the text as you see it. It does not check whether conflict markers are left. It does not close the window. See Source control for Continue after you resolve all conflicts.
  • Closing a merge window does not ask, also when you have unsaved choices. They are lost.
  • The Git console is one log for the whole app, for all projects. It keeps the newest 500 entries and at most 8 KiB of output for each command. In an address, the part before "@" shows as "***@".
  • The Git console lists Git commands that Orkestra runs. It does not list commands that you or an agent type in a terminal. It is not saved. The window has no button to copy or save the list.