Skip to content
Cogno v0.4.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 re-reads the status. A commit, and any Git command that fails, shows up as a notification.

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

Cogno runs the git on your machine, in the terminal’s directory. The panel therefore does not work while the terminal is inside a remote session such as SSH. WSL terminals work; there Cogno runs git inside the distribution.

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