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).
Use it
Section titled “Use it”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
| Action | Effect |
|---|---|
| Stage / unstage | Move a file, or a whole untracked folder, between the two lists |
| Stage all / Unstage all | Do the same for every change |
| Discard changes | Revert a file to its last committed state, after a confirmation |
| Open in editor | Open 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.
Open repositories
Section titled “Open repositories”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.
When the panel shows a message instead
Section titled “When the panel shows a message instead”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
gitis not installed or not on yourPATH- 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.
Signing in to a remote
Section titled “Signing in to a remote”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
ghCLI (gh auth login, thengh auth setup-git), the Git Credential Manager, or a personal access token typed as the password. - GitLab - the
glabCLI, 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.
Settings
Section titled “Settings”feature.git.mode—onenables the panel.feature.git.order— position in the side menu.
To open it with a different key, rebind open_git, see
Keybindings.