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 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.
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
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.
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.