Skip to content
v0.5.0

Git

The Git panel shows the repository of the terminal you are working in. You see what changed, stage and commit it, and inspect diffs without typing a Git command.

Open the panel with Ctrl+Alt+G (Command+Control+G on macOS).

The panel follows the focused terminal. Change directory or switch terminals, and it shows that repository instead. It lists:

  • the current branch
  • staged changes, with a box for the commit message and a Commit button
  • unstaged changes and untracked files; folders expand to their files
ActionEffect
Stage / unstageMove a file, or a whole untracked folder, between the two lists
Stage all / Unstage allDo the same for every change
Discard changesRevert a file to its last committed state, after a confirmation
Open in editorOpen the file with your system’s default application

The Refresh button updates the lists. A commit, and any Git command that fails, shows up as a notification.

The right edge of the panel lists the repositories of all open terminals, grouped by workspace in tab order. Each tile names the tab, the checked-out branch and how many files are new (+), changed (~) and deleted (−) against the last commit. Click a tile to jump to that terminal; the panel follows and shows its repository. The tile of the focused terminal is outlined.

A terminal outside a repository, or in a remote session such as SSH, has no tile. The toolbar button on the right toggles the list; drag its edge to resize it.

Select a file to see its diff side by side, with syntax highlighting. The left side is the last commit. The right side is the staged version for staged files, and the file on disk for unstaged ones. Very large files are cut off.

The panel needs a local repository it can read. It shows a message when:

  • no terminal is focused
  • the terminal’s directory is not inside a Git repository
  • git is not installed or not on your PATH
  • the repository has no commits yet

The panel does not work while the terminal is in a remote session such as SSH. WSL terminals work; there git must be installed in the distribution.

Fetch, pull, push and clone sign in the same way as git in your terminal: with your SSH keys and agent, or with the credential helper git is set up with. If it works in the terminal, it works in the panel.

If git has no sign-in for a host, it asks for one, and the panel shows the question in a dialog. If you cancel it, the panel shows how to set up access for that host:

  • GitHub - the gh CLI (gh auth login, then gh auth setup-git), the Git Credential Manager, or a personal access token typed as the password.
  • GitLab - the glab CLI, the Git Credential Manager (gitlab.com only), or a token.
  • Codeberg, Azure DevOps - the Git Credential Manager, or a token.
  • SSH remotes - a key, registered with the host.

Each way is a few commands. To terminal types a command into the focused terminal, and you run it with Enter. Copy copies it to the clipboard. The same dialog opens from a remote’s context menu, Set up access….

For a self-hosted instance, the dialog asks what is behind the host (GitHub Enterprise, GitLab, other) and remembers your answer.

Whether you have to type a token again depends on git’s credential helper. On macOS, Apple’s git keeps it in the keychain. The Git Credential Manager keeps it on every platform. Without such a helper, git remembers it for one hour.

To open it with a different key, rebind open_git, see Keybindings.