Git and Files
The Git view shows the session’s repository: its branches, its history as a graph, and its working changes. The Files view lets you read and edit the session’s files while its agent keeps working. The Git and Files buttons at the window’s right edge open each one over the board and the transcript for the open session, or for the project you focused, on its folder with no session (see Projects). The view’s header names the session, or the project. The same button closes it, and the other one switches to it. The view’s X button closes it too, and so does Escape, except in the editor. Files follows the agent’s edits as it makes them, and refreshes the rest when the session’s turn ends.
The session’s repository at its folder, or its worktree where it has one, or the project’s at its
folder, in three columns. /diff opens it too. It follows the repository as it changes, so an
agent’s commit shows as it lands, and it reads it all again when the window comes back to the front.
Where it can’t follow it, as past Linux’s limit of watched folders, it says so.
- The left column lists the local branches, in folders by their prefix (
feature/loginunderfeature), each with how far it’s ahead of its upstream (↑) and behind it (↓), or “gone” where its upstream was deleted, as when a merged pull request’s branch is removed; the branch and its commits stay on your computer. Then come the remote branches, in a folder for each remote, the worktrees, the stashes and the tags, folded the same way, each section with its count. A ref a tool wrote under a remote the repository doesn’t have, as a pull request’spr/25841, is a remote branch too, in one other refs folder after the remotes’ own, closed at first as theirs are, which says what they are in its tooltip, its path’s folders in it. In each, the names come first and the folders below them, each in name order. Local, Remotes and Worktrees start open, and every folder in them too, but each remote’s own folder, which may hold thousands of branches; Stashes and Tags start closed. A click on a section’s name closes or opens it, and one on a folder’s closes or opens that folder. Only what you close or open is kept: a remote opened the first time shows everything in it open, and a folder closed then opened again is back as it started. Each open section has a pane of its own, under its header, which scrolls on its own. The topmost open section takes what’s left. Each other one opens at a share of the column’s height, Remotes a fifth, Worktrees about a third and the others about a sixth, and none goes under three rows and a half. Drag the line on top of a section’s header, or use the arrow keys on it: up makes that section taller, taking the room from the open sections above the line, the topmost first; down makes the section above the line taller, taking it from those below, the nearest first. Nothing else changes size, and a section can’t be shrunk past its three rows and a half. A double-click puts the section below the line back to its height at first. A section you open takes its room from the topmost first, and one you close gives its room to the topmost. In a window too short for them all, the sections below the topmost give way down to their least, top first, and the column scrolls. Each keeps its share of the column with the folder’s Git view, so a taller or shorter window draws them in proportion. Filter narrows every section at once, each row by the words it shows, a worktree by its folder’s name and its branch, a stash by its message and its branch, and marks the match in each, opening the sections and folders that hold one. Each row starts with an icon of what it is: a branch, a folder, open or closed, a remote branch, a tag, a stash or a worktree. A name too long for the column is cut short, and shows whole in its row’s tooltip. A stash reads its message, or git’s ownWIP on mainwhere you gave it none, then, dimmed, “on” and the branch it was made on; its name, asstash@{0}, is in its tooltip, with the commit git’s own message names. The branch checked out has a check before its icon, and its row and the worktree the view opened on, the session’s own where it has one, are highlighted as a list’s chosen row is, each name in bold. Each worktree, and the branch checked out in it, names the sessions working there: the session you’re in says “this session”, another its title, which opens it, and several more how many, listed in the worktree’s menu. With a project open rather than a session, every session shows by its title or the count, and none says “this session”. - Drag the line between two columns to widen or narrow the one beside it, as you would the transcript panel: when it has the focus, the arrow keys move it, and a double-click puts the column back to its width at first. The left column starts at a fifth of the view and the right one at a little over a quarter, each within its least and its most, and each keeps the share you drag it to, so a wider or narrower window, or another display, draws them in proportion. The middle column always keeps its room.
- Fold the list to icons shrinks the left column to an icon for each section, with its count in the icon’s tooltip. An icon opens the column again with its section open. In a window too narrow for all three columns, the left one folds by itself and the right one narrows, so the graph and its controls keep their room; once you’ve folded or unfolded it yourself, or dragged its width, it stays as you left it, narrowing only as far as it must.
- A click on a branch, a remote branch, a tag, a stash or a worktree shows its commit, and so does one on a branch’s count of how far it’s ahead and behind, closing a file’s changes open over the graph, as Close the file does. The graph scrolls to the commit, sideways too where its dot is out past the column’s edge, and its row takes the keyboard’s focus, so the arrow keys go on from it at once, as from a commit you clicked. A click on a worktree’s working changes, at its row’s end, shows them instead: this folder’s own, or another worktree’s. Each branch, remote branch and worktree at the commit shown keeps the tint a hover gives it, whether you chose that commit there or in the graph, until you choose another; a worktree’s keeps it too while its working changes are chosen in the graph, and the branch checked out keeps its own highlight.
- A double-click on a branch also checks it out, as its menu’s Check out does, asking first where its menu would. One on a remote branch checks out the local branch that tracks it, or, where none does, makes one, as Check out as does. The branch checked out, or one another worktree has, only shows its commit.
- Over the end of each branch’s and remote branch’s name, while the pointer is on its row or the keyboard’s focus is in it, are its own buttons: hide it in the graph, pin it to the left, or show it alone. They take none of the row’s room, so its count stays at the row’s end. One that’s on stays marked beside the count. Above the graph, a branch shown alone or pinned is named, and a click there shows every branch again or unpins it. If that branch is deleted, every branch shows again, and the view says so. A pinned branch’s upstream, where it’s at another commit, keeps the column right after it, so main and origin/main both stay at the left. The repository’s default branch is pinned at first, unless it’s hidden; unpinning it, or pinning another branch, is kept for the folder. While a branch is shown alone, it takes the left itself and nothing is pinned; the pin comes back once every branch shows again.
- The middle column is the history, in columns named along its top: Branch / Tag / Worktree,
Graph, Message, Author, Date and SHA, Date and SHA hidden at first.
- Branch / Tag / Worktree holds each commit’s branch, remote-branch and tag labels: the first, the branch checked out first, then how many more. Each starts with its section’s icon from the left column: the computer for a local branch, the cloud for a remote branch, and the tag for a tag. A remote branch reads without its remote’s name. A branch and its remote branch at the same commit are one label with both icons: its upstream, or with none, the branch of its name on the default remote. Its menu is the branch’s, with the remote branch’s own beside it, named for it. With more than one remote, a remote branch on another, which no branch tracks, reads with its remote’s name before it, and one under a remote the repository doesn’t have always reads with its whole path. Pointing at a label says where it is: local, on which remote, or both. Point at them, or reach the row with the keys, and they all show at their full names over the columns beside them. They take the colour of the commit’s lane, and so does the line from them to the commit’s dot in the graph, the branch checked out’s a little wider, its name in white.
- Every other worktree of the repository shows at the commit it’s at, this folder’s own never. One on a branch shares that branch’s label, the worktree’s tree after the branch’s icons (the home for the repository’s main checkout), and pointing at it names the worktree too. One with no branch checked out has a label of its own, its tree and its folder’s name, whose menu is the worktree’s. A worktree whose folder is gone, or a bare repository’s main one, shows none.
- Graph draws the branches as lanes, each in its own colour, those side by side far apart, wide at first for nine lanes, or for as many as the repository has, up to 12. The repository’s default branch, the one its remote names, else main or master, else the branch checked out, is in the app’s primary blue, from its latest commit down, here and on the remote, and no other lane takes a colour near it.
- Where the repository has more lanes than the Graph column shows, it scrolls sideways: swipe sideways on a trackpad over the graph, or hold Shift and turn the wheel. Choosing a commit, by a click or the arrow keys, brings its lane into view. A line from a commit’s names to a lane out of view runs to the column’s edge, and reaches its dot once the lane scrolls in. The Git view keeps how far it was scrolled.
- Drag the edge between two names to widen or narrow a column; the message takes what’s left, and a column widens only as far as the message keeps its least width. When an edge has the focus, the arrow keys move it, and a double-click puts the column back to its width at first. Branch / Tag / Worktree starts at about a fifth of the list and keeps its share, so it widens and narrows with the list; the others keep their widths.
- In a narrow window, Author, Date and SHA narrow first. Past that, columns hide from the right: SHA, then Date, then Author, then Branch / Tag / Worktree, so the graph and the message always show. A column hidden for room stays checked in Columns and comes back once there’s room.
- Columns, above the history, checks each of Message, Author, Date and SHA that shows, at first Message and Author, and stays open as you show or hide them.
- The top row is the working changes, with how many files they touch. The history reads more as you scroll, so a large repository opens at once.
- Another worktree with working changes has a row of its own just above the commit it’s at, a
ring branching off that commit, saying how many files and whose, as “2 working changes on
login”. Choosing it shows them at the right, read only (below). They’re read when the view reads its worktrees, and again as a session’s turn ends there. - The chosen row is filled as a list’s chosen row is, more strongly than a hover, so it reads while the pointer is on another. Tab reaches the history at the chosen row. There, Down and Up choose the next and previous row, as a click does, the history scrolling to keep it in view and reading on past the rows read so far. Shift+Down follows the commit’s own lane to its first parent, past other branches’ commits between them, and Shift+Up goes back up that lane; from the commit checked out, Shift+Up goes to the working changes.
- The find box above the graph finds commits by their message, their author or their SHA, as Find by picks, as you type, once you pause, and chooses the first; Enter finds at once, and the arrows beside it go through the rest. It searches the whole history of the branches the graph shows, not only the commits drawn so far, and finds at most 100 commits, newest first; its count ends in + when there are more. A message or an author is found as written, ignoring case, and a SHA needs at least 4 of its characters.
- The right column shows the commit chosen, its details above its files:
- While the folder has working changes, a line above it all says how many, as the graph’s working changes’ row does, with Show changes, which chooses that row, closing a file’s changes open over the graph. Each other worktree at the commit with working changes has a line of its own under it, naming the worktree, its Show changes choosing that worktree’s row.
- At its top, “commit:” and its short SHA, which a click copies whole, a check showing it’s copied. A signed commit has a fingerprint before it, in the warning colour where the signature is bad or made by an expired or a revoked key; a pointer on it, or the keyboard’s focus, shows what git made of it, who signed it and the key, where git says. An unsigned commit has none.
- Its summary, large, and its description below it, in a darker box that scrolls on its own when the message is long.
- Its author, with the day and time they wrote it on your computer’s clock, and when they committed it where that was later, the time alone where it was the same day. Its committer shows apart only where someone else committed it. A pointer on a person’s circle or name shows their email.
- “parent:” and its short SHA under the author, or each parent of a merge; a click chooses that commit in the graph, scrolls to it and gives its row the focus, closing a file’s changes open over the graph.
- “Co-authors:”, each a circle, from the message’s
Co-authored-by:lines, a line repeated showing once; a pointer on one shows their name and email. - Below, how many files it modified, added and deleted (and renamed, where it renamed any), then its files by path, the folder dimmed and cut short at its end where the row is too narrow, and the name whole, each with its change and its type’s icon. A pointer on a path shows it whole, or a renamed file’s old path → its new one. The button at the right of the counts sorts them A to Z or Z to A. While they’re more than fit, a scrollbar shows beside them.
- A click on a file chooses it and opens its changes over the graph, as the last file’s changes showed (never its blame, history or whole text); Up and Down go through the files, the changes following, and Home and End go to the first and the last. A click on a file of the working changes opens its changes the same way. Its right-click opens its menu (below).
- The details start at a little under half the column’s height. Drag the line between the details and the files, or focus it and press Up or Down, to give either more room; it keeps its share of the column, and a double-click puts it back.
- Each person shows as a coloured circle with their initials, made on your computer, its colour made from their name, so each keeps theirs. Nothing about them is sent anywhere.
- With the working changes’ row chosen, the right column lists their files in sections, each
under a header with its count, as the left column’s are: Unstaged and Staged, always, even
with nothing in them, and In conflict above them while any file is.
- A click on a header folds its section or opens it. The sections share the room above the message. Drag the line between two, or focus it and press Up or Down, to give one more; the view keeps their shares.
- Each file shows its change, its type’s icon, its folder dimmed and its name, as a commit’s files do. A section with more files than fit shows a scrollbar beside them.
- A click on a file chooses it and opens its changes over the graph. Shift and a click choose every file from the last one clicked to it, and Cmd and a click (Ctrl on Windows and Linux) add a file or take it away. Shift with Up or Down stretches the choice. A choice holds one section’s files.
- A pointer on a file shows its own + or −, which stages or unstages it, or, in conflict, its ✓, which marks it resolved. A section’s header has Stage all, Unstage all or Mark all resolved; with two or more files chosen there, it acts on only those, and says how many.
- Under the files is the message, over a line of its own: drag it, or focus it and press Up or Down, to make it taller or shorter, the description growing and shrinking with it. It holds Stash the changes… and Apply a patch…, then the commit box, which takes a summary and a description. Amend the last commit changes the last commit instead, and fills an empty box with its message.
- Commit needs a summary and something staged. With Amend the last commit on, the button is Amend and needs only a summary.
- A merge, rebase, cherry-pick or revert that stopped partway says so in the band at the top of the right column, with Continue, Skip and Abort (see Conflicts).
- With another worktree’s working changes chosen, the right column shows them read only: how many and whose, the worktree’s path on a pointer, and Open for each session working there, or, where none does, Start a session here, as the worktree’s menu has them. Below are its files in the same sections. A click on a file opens its changes over the graph, inline, split or as its whole text, its hunks with no buttons. There’s nothing there to stage, discard, commit or stash: a session working in that worktree does that.
- Each working folder keeps its Git view as it was left, across a restart too: the column folded or not, the filter, the sections and folders you closed or opened, the columns and their widths, the find, the branches hidden, pinned or shown alone, the row chosen, how far down the graph was, the order of a commit’s files and how tall its details stand over them, how the working changes’ sections share their room and how tall their message stands, the file open over the graph and how it shows, the comparison, and the commit box’s draft. A session’s working folder is its worktree, where it has one, else its own folder, and every session working there shares its Git view, as it shares its terminals (see The terminal): two sessions in one folder, or a worktree session and another started in that worktree, see it alike. A session in another folder, or in another worktree of the same repository, has its own.
- When a folder’s last session is archived or deleted, or
/cdmoves it to another folder, its Git view stays as it was, and a session started there later finds it so. Moontors keeps this for the 20 folders left most recently, across a restart too. - It needs git, and the session’s or the project’s folder must be a git repository; otherwise it says why.
- If a read fails once the view is open, it says why above the graph, with Read again.
Fetch, pull and push
Section titled “Fetch, pull and push”The split button left of the find box does one of Fetch all, Pull, fast-forward if possible, Pull, fast-forward only, Pull, rebase or Push. Its arrow, What the button does, lists them, the button’s own marked Default; picking one does it and makes it the button’s default from then on, for every repository, across restarts. A choice that can’t run now, such as a pull with no branch checked out, says why in the list, and when it’s the default the button holds and says why too, while its arrow still opens.
- Fetch all fetches every remote; if one can’t be fetched, the others still are, and the view says what went wrong. Each fetch also drops the remote branches deleted on the remote, never a local branch or commit.
- Pull takes the branch’s upstream: fast-forward if possible merges where the branches have gone different ways, fast-forward only refuses then, and rebase replays your commits on top.
- Push sends the branch to its upstream. A branch without one goes to the repository’s only remote, or, with two or more, asks which in Push to a remote; that remote becomes its upstream. With no remote, the item can’t run and says so.
- A push the remote rejects says why: the remote has commits the branch doesn’t, or the branch is behind its remote (pull first, then push), or the remote declined it.
- A force push, from a branch’s menu, replaces the remote branch only while it’s still at the commit the view showed, so a teammate’s push in the meantime is refused rather than lost.
- While the view is open, it fetches every 3 minutes.
Git never asks for a password or a key’s passphrase here; it uses the sign-ins already set up on
this computer: your credential helper or keychain, Git Credential Manager, or your SSH agent. When
one is missing or refused, or a host isn’t trusted yet, the view says so. Set it up in the session’s
terminal, for example by running git fetch there once, then try again. When a host’s key has
changed since this computer trusted it, which can mean someone is in the way, nothing is sent, and
the view says so. A timed fetch that fails this way says nothing: the timed fetches stop, and start
again only once the Git view is closed and opened again; Fetch all shows why. A pull that stops
at a conflict is finished or aborted in the view (see Conflicts).
A right-click on a branch, a remote branch, a tag, a commit, the working changes, a stash, a worktree or a file opens its menu, as does the keyboard’s menu key on whichever has the focus. A commit’s branch, remote-branch and tag labels in the graph open their own. An item that can’t run now says why beneath it. An open menu follows the repository as it changes until you start using it: its items change with what you right-clicked, and a stash’s follows it to its new place. From your first move over its items or your first key, they stay where they are, and one that can no longer run as it reads is held in place, with why above the graph. It closes if what you right-clicked is gone.
- A branch: Check out; Merge into, Rebase onto and Fast-forward to, for the branch checked out; Fast-forward to its upstream where it’s behind; the three pulls, on the branch checked out; Push and Force push over its upstream; Create a branch here… and Create a tag here…; Make a worktree from it; Rename…, Set the upstream… and Delete; Copy the name and Copy a link. A branch checked out in another worktree has the three pulls too, each naming that worktree, and they run there; a session with a turn running in that worktree is asked about first, as one in yours is. A branch checked out nowhere has one pull, fast-forward only: it fetches the upstream and moves the branch forward to it, and refuses a branch that has gone a different way, as nothing is checked out to merge or rebase in. Under a branch’s Check out, dimmed where another worktree has it, are Check out its commit, detached, which checks its commit out here on its own, asking first as a commit’s does, and Start a session in that worktree, as the worktree’s own menu starts one.
- A remote branch: Fetch all, one of the split button’s choices over the graph; Check out as a local branch of the same name, or, where a local branch already tracks it, Check out that branch; merge, rebase or fast-forward the branch checked out; create a branch or a tag there; Delete from its remote; copy its name or a link. One under a remote the repository doesn’t have checks out as a branch with no upstream, as git can track nothing there, and Delete deletes it here alone, once confirmed; its commits stay until git cleans them up.
- A tag: Check out this commit; create a branch there; Delete the tag, or Delete the tag here and on a remote; copy its name.
- A commit: Check out each branch whose tip it is, and Check out as a local branch each remote branch there that no local branch tracks, above Check out this commit, which leaves no branch checked out; create a branch or a tag; Make a worktree here…; Cherry-pick and Revert; Fast-forward to this commit; reset the branch checked out here: Reset here, keeping the changes staged, Reset here, keeping the changes unstaged or Reset here, discarding the changes; on the commit checked out, Edit the message…; Compare with the working changes; Copy the SHA, Copy a link and Copy the patch.
- The working changes: Stash the changes…, Apply a patch…, Stage all and Unstage all. The first two are also buttons under the working changes’ files.
- Two or more of the working changes’ files chosen together, from a right-click on any of them: stage or discard them all where they’re unstaged, or unstage them all where they’re staged, each item saying how many. The discard asks once, naming every file.
- A stash: Apply it, Apply it and drop it, or Drop it.
- A worktree: Open each session working in it, Start a session here (with several agents signed in, one for each, such as Start Codex here), Remove the worktree or Remove the worktree and its branch, and Copy the path.
- A file, among a commit’s files, the working changes or a comparison, or from the button beside its name over the graph: Open in Files, where it’s inside the session’s folders, the tree open down to the file, it selected and opened as the preview; Open in the text editor, never in the app for its kind, so nothing an agent wrote runs; Reveal in Finder (Reveal in File Explorer on Windows, Open Containing Folder on Linux); Show its changes, as they were last shown, Show its history and Show its blame; staging, unstaging, discarding or restoring it, as its side allows; for an untracked file, Ignore the file, every file with its extension, or its folder; Delete the file; Copy the path, Copy the relative path (its path in the repository, as git names it) and Copy the patch. Moontors checks each path is inside the view’s worktree before opening or showing it.
Some items ask first, in a dialog of their own: Create a branch (its name, and Check it out or not), Rename the branch, Set the upstream (as remote/branch, with the remote branches offered), Create a tag (a message makes it annotated), Make a worktree (a new branch, or none for the commit on its own), Edit the last commit’s message (what’s staged stays out of it), Stash the changes (with a message) and Apply a patch (pasted, and Stage it too or not).
Discarding, deleting a file, resetting, force pushing, deleting a remote branch, rebasing and dropping a stash always ask in Before it runs, with what they lose: the commits no other branch or tag holds, and the working changes to how many files. Deleting a branch or removing a worktree asks when it would lose either, and restoring a file asks where it has changes of its own. So does any action that would change the files of a folder where a turn is running. Deleting a tag, here or on a remote too, asks where it alone holds commits, and so does a checkout, of a branch, a remote branch or a commit, that leaves behind a detached HEAD whose commits no branch or tag holds. A copy says it’s done, and a link is built only for github.com, gitlab.com and bitbucket.org.
Compare with the working changes lists, at the right, the files that differ between the commit and the working tree, under Compared with the working changes, as a commit’s files are listed; a click opens a file’s changes from the commit to the working tree. Back to the commit ends it, as choosing another row does.
Worktrees and sessions
Section titled “Worktrees and sessions”Each worktree in the left column starts with a worktree’s icon, the repository’s main checkout with a home, and says how far its branch is ahead of its upstream and behind it, as the branch’s own row does, and a dot after that when it has changes not committed yet. Hover over the dot, or focus it, to see how many files are modified, added, deleted or renamed, in the colours and icons a commit’s files use. The worktree the view is open on follows its files as you edit them, and another follows each of its sessions’ turns and each stage, commit, checkout or fetch in the repository; a change made by hand in another worktree shows at the next of those, or when the view opens again.
A worktree in the left column with one session working in it names that session, and a click opens
it; one with several says how many, and a click lists them in its menu to open. The + beside a
worktree, or Start a session here in its menu, starts a session in its folder at once, with the
agent’s defaults from Settings, and opens it. With several agents
signed in or set to check at start, the + opens the worktree’s menu, which starts each by name, such
as Start Codex here, in your order; with none, there’s no +. A session started there works in
that worktree’s folder, sharing its terminals and its Git view with any other session working there.
Where a worktree session already works in it, the new session holds the worktree with it: the
worktree stays while either is open, the last one out removes it, and /cd can’t move either
elsewhere. A session started there while the last one’s archive is removing the worktree waits for
the archive, then joins the worktree if it’s still held, or starts in the folder as in any other, if
the folder is still there. A worktree made here that no session holds is the new session’s folder
like any other: /cd can move the session away, and the worktree stays until you remove it. Its
menu also offers Remove the worktree, or Remove the worktree and its branch, though never
the main worktree or the one the view is open on; a worktree a session still works in is refused,
and the view says to archive or delete that session first.
A file’s changes
Section titled “A file’s changes”A click on a file, among a commit’s files or in the working changes, opens its changes over the graph. Close the file, the X at the right end of the bar above them, shows the graph again, as choosing a ref in the left column, a parent in the details or Show changes does. The graph comes back as you left it, scrolled where it was and its find kept, and the commit chosen takes the keyboard’s focus, so the arrow keys go on from it at once: the one you left, or one you chose in the file’s blame or history, scrolled to if it’s out of sight. The buttons above it show:
- Inline and Split: the file before and after in the editor’s comparison, in one column or side by side, with the stretches that didn’t change folded away to 3 lines around each change, as git cuts its hunks. Each hunk git cut has a bar above it, with where it starts on each side, the function it’s in where git names one, and its buttons (below); side by side, the other side keeps level with it. Added and removed lines are tinted green and red, and the words changed in them more strongly. Inline is how a file’s changes open at first.
- File: the whole file on that side: in the working tree, as staged, or as the commit has it.
- Blame: each line with the commit that last changed it. A click on a commit chooses it, and the right column shows it. Lines not yet committed say Not committed yet. Staged changes have no blame, as blame reads the working tree or a commit, not what’s staged.
- History: the commits that changed the file, newest first, across renames. A click chooses the commit and opens the file’s changes in it.
Beside Inline and Split, where they act:
- Ignore whitespace, on at first, changes only what’s shown: a line whose only change is whitespace at its start or end isn’t marked, and a file or hunk whose only changes are such whitespace says so. The hunks stay git’s own, so their buttons act on them either way.
- Wrap lines, on at first, wraps long lines, and Previous change and Next change go from one change to the next.
What the file can do:
- Each hunk’s bar acts on git’s own: unstaged, Stage hunk or Discard hunk; staged, Unstage hunk; in a commit, Revert into the working changes. A hunk that changed since it was shown is refused rather than guessed at.
- The file itself: unstaged, Stage file or Throw away the changes; staged, Unstage file; in a commit, Restore from this commit, which puts it back as it was there, asking first where the file has changes of its own.
- Discarding a file’s changes asks first, in Before it runs, with what it loses, and so does an action that would change the files of a folder where a turn is running: Go ahead or Cancel. A hunk’s Discard hunk goes at once, asking only where a turn is running.
- A file in conflict opens to its panes, with no hunks (see Conflicts), and its changes show here once it’s resolved.
- An image (PNG, JPEG, GIF, WebP, AVIF, BMP and ICO), an SVG file, a PDF, a font, a video or a sound
shows its two sides side by side, each in the preview Files gives it (see Previews): the
old on the left and the new on the right, each named over it, as the parent commit and this
commit, HEAD and what’s staged, what’s staged and the working tree, or the commit compared and the
working tree. Side by side stands in place of Inline and Split, File shows the file
on its side alone, Blame isn’t offered, and History lists the commits as ever.
- Two images are drawn at one scale, the one that fits the larger in its half, so their sizes compare as they are, each on a checkerboard that shows its transparency, with its size and dimensions under it. Fit, 100%, the zoom buttons, the keys and the wheel zoom both together.
- A PDF’s pages show page by page, each beside the other side’s page of the same number, and scroll together, drawn at one scale, the one that fits the wider page in its half, with the page you’re on counted. Fit, 100% and the zoom buttons zoom both. A page one side doesn’t have, as a page added, is blank there, and a side that won’t open, as a PDF locked with a password, says so under its name.
- A video’s or a sound’s two players each play with their own controls, each with its size and length under it. A font’s two samples each show under the font’s family and style.
- An SVG’s Source shows its text’s changes, inline or split, and Source again its images.
- A file added shows the new side alone, the old one saying the file wasn’t there yet, and a file deleted the old side alone, the new one saying it was deleted. A side too large to show says so in its place.
- Any other binary file says so in place of its lines, and a very large change has bars on its first hunks alone, and says so.
- A change of line endings alone (Windows’ and plain line breaks) or of the byte-order mark alone shows no changed lines in the comparison, so the view says “Only line endings differ.”, “Only the byte-order mark differs.” or “Only line endings and the byte-order mark differ.”; its hunk’s bar still stages or discards it.
- A renamed file’s name above its changes reads old path → new path. Renamed with no line of it
changed, it shows no lines in Inline or Split: they say
“Renamed, with no change to its content” over its two paths, the folder they share once and the
part that differs marked. Renamed with changes, it shows them as any file’s. File shows it as
it stands either way. A copy shows the same, worded as a copy; git lists one only among the
staged changes, where git’s own
diff.renamesis set tocopies. - A file whose mode alone changed, as one made executable, shows no lines either: “Only its mode changed, not its content.”, then “Made executable.”, “No longer executable.” or both modes.
- Inline, Split, File and Blame read the file’s whole text, which opens only as UTF-8 and at most 10 MB. History lists the newest 1,000 commits that changed the file.
- Each working folder keeps the file it had open and how it showed it, as it keeps the rest of the Git view.
Conflicts
Section titled “Conflicts”When a merge, a rebase, a cherry-pick or a revert stops at a conflict, started here or in the session’s terminal, a band shows at the top of the right column, whichever row is chosen.
- It says what stopped: which branch is being merged into which, which branch is being rebased onto what and at which step of how many, or which commit is being picked or reverted. Under that, the commit being applied and how many files are left in conflict.
- Open the first opens the first file in conflict over the graph, with the working changes at the right.
- Continue goes on once no file is left in conflict, keeping the message git wrote for the step. A rebase or a run of picks that stops again at its next step shows that step.
- Skip leaves out the commit it stopped at and goes on, in a rebase, a cherry-pick or a revert.
- Abort puts the branch back as it was before. Skip and Abort ask first, in Before it runs, saying what’s thrown away: the steps a rebase already replayed or the commits already picked, and the changes in the working files. A rebase’s branch keeps its own commits as they were.
The files in conflict are listed under In conflict. A file’s menu, or the menu of several chosen there, offers:
- Take one side’s whole file, each side named for what it is: your branch and the branch merged in; in a rebase, the branch it’s rebased onto, with what’s been rebased so far, and the commit being replayed; in a cherry-pick or a revert, the commit. Where that side deleted the file, the item deletes it instead, and says so. It asks first, and marks the file resolved.
- Mark resolved, once you’ve edited the file into what it should be: it’s staged as it stands, and where conflict markers are still in it, it asks first.
- Start over, as git merged it, which puts the file back as git first merged it, its conflict markers in, over what you’ve made of it. It asks first, and shows only where both sides have the file.
A file in conflict opens over the graph to its panes: your side and the other side next to each other on top, each named as above, and below them the result: the file itself, which you can edit.
- Each conflict is lit on both sides. Its bar in the result takes one side or both, and the bar over it on a side takes that side.
- A box beside each of a side’s lines puts that line into the result: click it, or press Space on the line. Lines picked on both sides go in your side’s first, each side’s in its own order. With none picked, the conflict is back as git wrote it.
- The toolbar says how many conflicts are left and goes to the previous or next one. It also takes one side throughout, saves the result, marks the file resolved, starts over as git merged it, and goes to the previous or next file in conflict. Mark resolved saves first, then opens the next file in conflict.
- Leaving the file with edits not saved asks first, as a file in Files does: Keep editing or Discard. Switching to another session keeps them for when you come back, and if the file changed on disk meanwhile, they’re still kept, and Reload or Overwrite decides. Closing the window, quitting or restarting to update asks about them with Files’ unsaved files.
- Each take and each pick undoes on its own.
- A file that can’t be shown as text, one that one side deleted, or one outside the folders the session’s files reach is taken whole, a side at a time.
A stash whose changes meet a conflict as it’s popped or applied is kept, and its files are resolved the same way.
How actions run
Section titled “How actions run”- Each action is your own git, run as you’d run it, so your hooks and commit signing run too. When git refuses, its own message shows as it wrote it, in your language.
- A merge, rebase, cherry-pick or revert is refused while tracked files have changes: “Working changes would be overwritten. Commit or stash them first.”
- A stash that moved before the view could show it, as when another stash was made at that moment, is refused: “This changed since it was shown. Check it again, then try again.”
- What an action loses is counted as it runs, after any action or fetch before it in the same repository, so the question is never about a state that has since changed.
- If another git is writing in the repository at that moment, as an agent’s commit, the action tries once more, then says so. Moontors never deletes git’s lock files.
- A stash takes the untracked files too, never the ignored ones. Dropping one counts the files it holds, its untracked ones included.
- Ignoring a file adds a line to the
.gitignoreat the top of the worktree. A file git already tracks stays tracked until it’s removed from the index. A.gitignorethat’s a link, or anything but a file, is left as it is, and Ignore says so. - A worktree made here goes in Moontors’ own folder, named as a worktree session’s is. A post-checkout hook that fails or takes too long leaves it made, as it does a session’s, and the view says so with what the hook printed (see Worktrees).
- A merge, rebase, cherry-pick or revert that stops partway, as on a conflict, is continued, skipped or aborted from the band over the right column (see Conflicts). A stash whose changes meet conflicts as it’s popped or applied is kept.
A file tree on the left, and an editor on the right with a tab per open file.
- The tree’s own row, Files at its top, shows its buttons at its right while the pointer is over the tree or the focus is in it, as VS Code’s does: New File…, New Folder…, Collapse Folders, which closes every folder below the folders at the top, leaving each of those open on its first level, and the session keeps them closed, and Search, which opens the search in the tree’s place (see Searching the files).
- New File… and New Folder… put a box for its name in the tree: in the folder you chose, in
the chosen file’s folder, or with nothing chosen in the first folder at the top. Enter makes it,
and a new file opens in its tab; Escape, or Enter with no name, lets it go. Slashes in the name
make the folders between, as
lib/util.tsdoes. A name that’s already there, that starts with a slash or that can’t be a file’s name says so under the box and isn’t taken; a space at either end of the name only warns. - To rename a file or a folder, press Enter on it (F2 on Windows and Linux), as in VS Code. The box selects the name up to its extension, and F2 in it selects the whole name, then the extension, then the name again. Enter renames, Escape doesn’t, and clicking away renames when the name can be taken, leaving the focus where you clicked; a new file made by clicking away opens without taking the focus. An open file’s tab follows it, unsaved changes and all, as do the tabs of the files in a renamed folder. The folders at the top can’t be renamed.
- Drag a file or a folder onto a folder to move it there, onto a file to move it into that file’s folder, or onto the space below the rows to move it into the last folder at the top; the folder it would go into is marked. A folder can’t go into itself or a folder inside it. Open tabs follow the move.
- If a move or a rename would replace a file or folder already there, Files asks first: Replace or Cancel. It also asks when an open tab there has unsaved changes, even if its file is gone, and names those tabs. The tabs of whatever is replaced close.
- Drag files or folders from Finder, File Explorer or your file manager onto the tree to copy them
into the folder under the pointer, or onto the space below the rows to copy them into the last
folder at the top. Or copy them in your file manager, then press Cmd+V (Ctrl+V on Windows and
Linux) in the tree to copy them into the chosen folder. A name that’s already there takes a copy’s name, as VS Code
gives one:
notes copy.txt, thennotes copy 2.txt. A folder copies whole, leaving out any links in it, and the originals are never changed. - Hold a drag over a closed folder for a second and it opens.
- An archived session’s files can’t be made, renamed, moved, pasted into or deleted, and nothing is ever made outside the session’s folders.
- The tree leaves out
.git; git-ignored files show dimmed. Outside a git repository it leaves out hidden folders andnode_modules. A folder lists at most 5,000 entries, then says “More files than are listed”. The @ file picker still leaves git-ignored files out. - Each file shows its type’s icon, from the Material Icon Theme that VS Code uses, here, in the Git view’s file lists, and on the files added to a message. Folders show none.
- In a git repository a changed file’s name takes its change’s colour and ends in a letter:
Mmodified,Aadded,Rrenamed,Uuntracked andCin conflict. A deleted file isn’t in the tree, but the folders above it show it. A folder holding a change, however deep, shows a dot in the colour of the strongest change inside it. The marks follow the repository as it changes, as the Git view does. - A click anywhere on a row works it: a file’s opens the file, and a folder’s opens or closes it.
- A click opens a file in the preview tab, its name in italics, as VS Code does: a click on another file shows that one in the same tab, in the same place, so the first doesn’t stay. A double-click keeps the file among the tabs, as does editing it, saving it or double-clicking its tab; once kept, the next click opens a new preview beside it. From the keys, Cmd+Down (Enter on Windows and Linux) keeps the file with the focus in its editor, and Space opens it as the preview. A link to a file and Open in Files open it as the preview too.
- The tree follows the tab you’re in, as VS Code’s explorer does: as a tab becomes the active one, by a click on it, Go to File, a search result or a link, the tree opens down to its file, chooses it and scrolls it into view, leaving the focus where it is. A file the tree doesn’t list, as one Files hides, isn’t shown, and switching sessions leaves each tree as it was.
- Hovering a file or a folder in the tree shows its path from the folder at the top.
- Drag the line between the tree and the editor to widen or narrow the tree, as you would the transcript panel: when it has the focus, the arrow keys move it, and a double-click puts it back to its width at first, about a sixth of Files. It keeps its share of Files, so a wider or narrower window draws it in proportion. The editor always keeps room. The width is one for every session’s Files, and it lasts across a restart.
- The editor colours code like the transcript does.
- Files open from the session’s folder (or its worktree) and any folder added with
/add-dir, never from anywhere else. A link in a reply, or a path on a tool’s row, to a file the transcript’s preview can’t show, such as a video, opens it here, the tree open down to it; one outside those folders shows in your file manager instead. - A tab shows when it has unsaved changes. Cmd+S (Ctrl+S on Windows and Linux), or Save in the File menu, saves the active tab wherever the focus is in Files, the tree and the tabs too, writing the file in place and keeping its permissions; a tab with no unsaved changes writes nothing. Cmd+W (Ctrl+W) closes the tab.
- With Save files as you leave them on, as it is at first (see Settings), a file’s unsaved changes are saved as you switch to another file, close its tab, or leave Files for another view, session or project. A save that’s refused, such as over the agent’s change, keeps the changes and says why. A file deleted under unsaved changes is never written back by auto-save: its tab stays open with them, saying the file is gone, and closing it asks first. With it off, closing a tab with unsaved changes asks “Discard unsaved changes?”: Discard or Keep editing.
- Files opens text in UTF-8 only. A file larger than 10 MB, or text in another encoding, opens as a note in its tab saying why, never as text that saving would damage. An image, a PDF and the other kinds below open in a preview (see Previews); any other binary file says it has no preview.
- If the editor doesn’t load, Files says “The editor didn’t load.” with Try again.
Previews
Section titled “Previews”Images, SVG files, fonts, videos, sounds, PDFs and tables open in a preview in their tab, in place of the editor. A bar above each holds its controls, but for videos and sounds, which play with their own.
- Images (PNG, JPEG, GIF, WebP, AVIF, BMP and ICO) fit the tab. Fit, 100% and the zoom buttons change that, as do the keys while the image has the focus: = or + zooms in, - zooms out, 0 shows the actual size and 9 fits it again. The scroll wheel zooms too with Cmd (Ctrl on Windows and Linux) held, as does a pinch. The bar shows the file’s size and the image’s dimensions.
- SVG files show as an image, so nothing in them runs. Source opens the file’s text in the editor, where you can edit and save it, and Source again shows the image.
- Fonts (TTF, OTF, WOFF and WOFF2) show a sample: the alphabet, the digits and a line at several sizes, under the font’s family and style. A WOFF2 font goes by its file’s name.
- Videos (MP4, M4V, WebM, MOV and OGV) and sounds (MP3, WAV, M4A, AAC, FLAC, Ogg and Opus) play with their own controls, and a large one seeks at once. A format or codec that can’t be played says so.
- PDFs show their pages, each drawn as you scroll near it, fitted to the tab’s width and zoomed as an image is, with the page you’re on in the bar. You can select and copy their text. A PDF locked with a password says so.
- CSV and TSV files show as a table, its first line the header, each field on one line; Source opens their text. A file of more than 10,000 rows or 200 columns shows the first and says so.
- A preview keeps its place as you zoom, and its tab keeps its zoom and place when you switch to another tab and back. A video or a sound pauses when you leave Files.
- A preview shows the file as it is on disk, so an agent’s edit shows as the agent makes it (a command’s change as its turn ends), and edits in Source show once they’re saved.
The tree’s menu and keys
Section titled “The tree’s menu and keys”Right-click a file or a folder in the tree for its menu, as VS Code’s explorer shows it; the row you right-click becomes the chosen one. Shift+F10, or the keyboard’s menu key, opens the menu of the row with the focus. Each item shows its keys, which work while the tree has the focus; the Edit menu’s Cut, Copy and Paste act on the tree there too. An open menu follows the tree as the Git view’s does, its items changing with the entry until you start using it, and closes once the entry is renamed or deleted.
- A file’s menu holds Reveal in Finder, Cut, Copy, Copy Path, Copy Relative Path, Rename… and Delete. A folder’s adds New File…, New Folder…, Find in Folder… and Paste. A folder at the top has no Cut, Copy, Rename… or Delete. On a link, Copy is greyed.
- The keys act on the row with the focus, the one the arrow keys move to, even when another is still chosen.
- Reveal in Finder, Reveal in File Explorer on Windows and Open Containing Folder on Linux, shows the file or folder in your file manager.
- Cut dims the entry until you paste it. Pasting moves a cut entry into the folder, as a drag does, asking first before it replaces anything, and copies a copied one, a name that’s already there taking a copy’s name. A cut pastes once; after that there’s nothing of it left to paste.
- The menu’s Paste pastes only what you cut or copied in the tree, and is greyed once anything else has been copied since, as files in your file manager. Cmd+V (Ctrl+V on Windows and Linux) pastes whichever you copied last: files copied in your file manager, or what you cut or copied in the tree. On a file, it pastes into that file’s folder.
- An entry cut in another session’s Files is copied into this one, the original staying where it was, and the tree says so.
- Copy Path puts the whole path on the clipboard, and Copy Relative Path the path from its folder at the top, in your system’s separators; for a folder at the top, its name.
- Delete asks first, as VS Code does, saying the file or folder can be restored from the Trash (the Recycle Bin on Windows) and naming any open tab whose unsaved changes it would lose. Move to Trash (Move to Recycle Bin on Windows) moves it there, and its tabs close; Files never deletes anything for good.
- Find in Folder… opens the search with the folder’s path in files to include, as
src/app/**, and the search’s field ready to type in; on a folder at the top, the field is left empty, so every file is searched. In a session with folders added with/add-dir, that path matches in each of them that has it. - New File… and New Folder… put the name box in that folder.
- An archived session’s menus grey whatever would change its files; copying a file or its path, revealing it and finding in a folder still work.
| Item | macOS | Windows | Linux |
|---|---|---|---|
| Cut | Cmd+X | Ctrl+X | Ctrl+X |
| Copy | Cmd+C | Ctrl+C | Ctrl+C |
| Paste | Cmd+V | Ctrl+V | Ctrl+V |
| Copy Path | Option+Cmd+C | Shift+Alt+C | Ctrl+Alt+C |
| Copy Relative Path | Option+Shift+Cmd+C | Ctrl+K, then Ctrl+Shift+C | Ctrl+Shift+Alt+C |
| Rename… | Enter | F2 | F2 |
| Delete | Cmd+Backspace | Delete | Delete |
| Reveal | Option+Cmd+R | Shift+Alt+R | Ctrl+Alt+R |
| Find in Folder… | Option+Shift+F | Shift+Alt+F | Shift+Alt+F |
Searching the files
Section titled “Searching the files”Search, among the tree’s buttons, shows the search in the tree’s place, as VS Code’s Search view does; its X goes back to the tree, with the focus on Search. Open in Files and a link to a file show the tree in the search’s place. Cmd+Shift+F (Ctrl+Shift+F on Windows and Linux), or Find in Files in the Edit menu, opens it from anywhere in the window, in the Files view of the session the panel shows, or else of the selected card’s or the focused project’s, the search’s text selected.
- Type in the Search field: it searches the session’s folder (or its worktree) and any folder
added with
/add-dir, or the project’s folder, as you type, once you pause. Enter searches at once. Up and Down step through what you searched before. Inside the field, Match Case, Match Whole Word and Use Regular Expression narrow it, and Clear empties it, leaving the focus in it. - The results show how many there are in how many files, then each file, with its icon, its name, its folder and its count, which folds away with a click, and under it each match on its line. A click on a match opens its file in the preview tab with the match selected; a double-click keeps the file among the tabs. A search stops at 10,000 results and says so.
- Hidden files are searched, and
.gitnever is. Toggle Search Details shows files to include and files to exclude, each taking globs apart by commas, such as*.ts, src/**. Search only in Open Editors, in the first, searches only the files open in tabs. Use Exclude Settings and Ignore Files, in the second and on at first, leaves out what.gitignoreand the other ignore files leave out; off, it searches everything but.git. - A file open with unsaved changes is searched as its tab holds it, not as it is on disk.
- With nothing typed the panel stays empty under its fields. When nothing is found, it says “No results found. Review your settings for configured exclusions and check your gitignore files.”, with Clear the files to include and exclude while either holds any.
- Toggle Replace, the arrow beside the search, shows the Replace field, with Preserve
Case inside it, and Replace All beside it. Replace All asks first how many it replaces
in how many files, and with what: Replace or Cancel. In a regular expression search the
replacement reads as JavaScript’s own replace reads it:
$1to$99put in that group where there’s one,$<name>a named group,$&the whole match and$$a dollar, and any other$stays as it is;\n,\tand\\put in a line break, a tab and a backslash. Preserve Case gives each replacement its match’s case. Files are written in place; a file open with unsaved changes is replaced in its tab and left unsaved. A file that changed since the search, on disk or in its tab, is left as it is, as is one that can’t be read or written as text. Once it’s done, the panel says how many it replaced in how many files, and how many files it left, and why. Replace All waits while a search runs, and, after a search that stopped at its limit, for one narrow enough to show every result. - The session keeps the search as you left it, through closing the panel, closing Files and a switch to another session: the text, the switches, the files to include and exclude, the replacement, and whether the replace row, the details and the panel show.
Going to a file
Section titled “Going to a file”Cmd+P (Ctrl+P on Windows and Linux), or Go to File… in the Edit menu, opens a search over the whole window from anywhere in it, as VS Code’s Quick Open does: the files and folders of the session the panel shows, or else of the selected card’s or the focused project’s.
- Type part of a name, its letters in order though not side by side:
fvfindsFilesView.tsx. A file whose name holds what you type comes before one whose folders do, and the letters found are marked. Each row shows the file’s icon, its name and its folder. It lists the best 50, and leaves out any spaces you type. - Up and Down move, and Enter opens. A file opens in the session’s or the project’s Files view, which opens if it isn’t, kept among the tabs, with the focus in the editor; Cmd+Enter (Ctrl+Enter on Windows and Linux) opens it in the preview tab instead. A folder opens the tree down to it, chosen, with the focus. Enter pressed while the files are still being read opens what you typed once they are.
- With nothing typed, it offers the session’s open files, the one you were last in first.
- It searches the session’s folder (or its worktree) and any folder added with
/add-dir, or the project’s folder, as Find in Files does at first: hidden files too,.gitnever, and nothing that.gitignore, the other ignore files or Files leave out. It lists up to 50,000 files and says so when there are more. The list is read again each time it opens, the one from the time before showing at once meanwhile. - With no session to search, as right after the last one was deleted or archived, it says “Open or select a session to search its files.” It says the same if the session goes while it shows. When the session’s folder can’t be read, it says why.
- Escape, a click beside it, or Cmd+P (Ctrl+P) again closes it, the focus back where it was. In the terminal too, Cmd+P (Ctrl+P) opens it rather than going to the shell.
The editor
Section titled “The editor”The editor is the one Visual Studio Code is built on, with its own keys and its right-click menu: cut, copy and paste, find and replace (Cmd+F, or Ctrl+F on Windows and Linux), folding, several cursors at once, and moving and copying lines.
- A line longer than 10,000 characters is cut off on screen, and one longer than 50,000 isn’t coloured. The file itself is kept whole.
- Each session keeps its open tabs, the active one, the tree’s open folders and choice, and the search across a switch to another session and across a restart, each tab reading its file again from disk after one. Unsaved edits are kept only while the window is open: closing the window with unsaved edits asks first.
- When a folder’s last session is archived or deleted, its Files are left to the folder: a session
started there later, with no Files of its own yet, opens on the same tabs, each read again from
disk, the tree’s open folders and choice, and the search, even when no window was open as the
session was archived. Moontors keeps this for the 20 folders left most recently, across a restart
too. A session that
/cdmoves keeps its own Files.
Editing beside the agent
Section titled “Editing beside the agent”- When the agent changes a file you have open with no unsaved changes, the tab reloads as soon as its edit is written, not only when its turn ends. Undo takes you back. A file the agent makes shows in its folder in the tree at once, if that folder is open. A change made by a command the agent runs shows when its turn ends.
- When you have unsaved changes and the agent changes the file, your changes are kept, and the tab says the file changed on disk.
- Saving a file that changed on disk since you opened it asks first: Reload, Overwrite, or Keep editing.
- If the file is deleted while you have unsaved changes, the tab keeps them, and saving writes the file again.
- A file that mixes line endings says so: saving makes every line end the same way.
- Your hand edits aren’t part of Claude Code’s checkpoints, so a
/rewindthat restores files can overwrite them; its confirmation says so. - Archiving a session with unsaved changes asks first. So does Restart to update, naming the unsaved files: Restart and discard, or Keep working.
- Closing the window or quitting with unsaved changes asks Close with unsaved changes?: Save all saves each file, then closes or quits; Discard drops the changes; Cancel keeps you editing. If a file can’t be saved, it’s named, and nothing closes. A message you’ve started typing to the agent, in any session, holds a close too: the question names “the unsent message in” its session. Save all saves only the files and lets the message go; with no files to save, the question offers Discard and Cancel.