Skip to content
ozklPublic

About

A cross platform git client

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Gitr

A fast, native Git client written in Rust with egui. Runs on macOS, Windows and Linux. It drives the installed git executable, so it behaves exactly like git on the command line (hooks, credential helpers, config).

Gitr showing a repository's commit graph and commit details

Features

  • Repository manager: saved repositories, tabs, drag and drop a folder to open it, clone, init
  • Workspaces: named sets of repositories (e.g. Home, Work), each with its own repository list and open tabs; switch from the toolbar
  • Commit graph: colored lanes, branch/tag badges, search by message, author, SHA or ref, and keyboard navigation
  • Commit details: author/committer, refs, parents, message, inline diffs (Commit tab), a file list with a full diff (Changes tab), and a browsable tree of the files at that commit (File Tree tab)
  • Local changes: stage or unstage files, hunks and individual lines, discard changes, resolve conflicts (ours/theirs/merge tool), commit, amend, commit and push
  • Diffs: word-level highlighting, adjustable context, ignore whitespace
  • Branches, remotes, tags, stashes, submodules in the sidebar, each with context menus: checkout, merge, rebase, create/rename/delete, fast-forward, push, apply/pop/drop stash
  • Operations: fetch, pull (merge/rebase, autostash), push (upstream, force-with-lease, tags), stash, cherry-pick, revert, reset (soft/mixed/hard), and continue/abort/skip for a merge, rebase, cherry-pick or revert in progress
  • Activity log of every git command, error notifications, dark/light themes, UI zoom

Credentials

Gitr uses your normal git setup: credential helpers (macOS Keychain, Git Credential Manager), SSH keys and ssh-agent. When git or ssh still needs something (a username, password/token, key passphrase or confirmation of a new SSH host key), Gitr shows a small dialog. It is registered as GIT_ASKPASS / SSH_ASKPASS for the git commands it runs. The answer is piped straight back to git; Gitr never logs or saves it. Git itself may save working HTTPS credentials in your configured credential helper.

GitHub

Open Accounts in the toolbar (also on the start screen and in the + menu) to add GitHub accounts and browse and clone their repositories.

Sign-in uses a personal access token: create one with the repo scope and paste it once. You can add several accounts; each token is stored under its GitHub login.

With more than one account, Gitr picks the account for each repository automatically when it runs fetch, pull, push or clone on an HTTPS GitHub remote: the account that owns the repository, or otherwise the one GitHub says can access it (push access first). It passes that choice to git for the command only (credential.<url>.username); nothing is written to the repository, and an account you configured yourself is respected. SSH remotes authenticate by key and are unaffected.

To pin a repository to an account or an SSH key, use Repository Settings (gear on the tab): GitHub account sets credential.https://github.com.username, and SSH key sets core.sshCommand (ssh -i <key> -o IdentitiesOnly=yes) in that repository's .git/config, so the command line and other tools behave the same.

Gitr does not store the token. It is handed to git's credential helper, which keeps it in the operating system's secure store (the macOS Keychain, Git Credential Manager on Windows, libsecret on Linux), and is read back only for the duration of a request. Signing out removes it from that store. Because it is saved the way git expects, HTTPS pushes and pulls to github.com use it too.

Build & run

cargo run --release -- /path/to/repo

Linux needs the usual windowing dev packages (e.g. libxkbcommon-dev libgtk-3-dev).

Linux desktop installation

./install-linux.sh

This builds the release binary and installs it to ~/.local/bin, with a desktop launcher and icons under ${XDG_DATA_HOME:-~/.local/share}. Wayland uses the gitr.desktop entry matching the window's app ID to display the Gitr icon. Restart Gitr after installing; you can launch it from your application menu.

macOS app bundle

./bundle.sh               # dist/Gitr.app for this Mac's architecture
./bundle.sh --universal   # Apple Silicon + Intel
./bundle.sh --dmg         # also dist/Gitr-<version>.dmg

The bundle is ad-hoc signed; set SIGN_IDENTITY to a Developer ID identity (and notarize) to distribute it. The icon comes from assets/icon-1024.png, rendered from assets/logo.svg.

Windows executable

Build on Windows with the Rust MSVC toolchain and Visual Studio Build Tools (including the Windows SDK):

cargo build --release

target/release/gitr.exe includes the icon resource for Explorer and shortcuts. App windows also use the embedded PNG icon, including authentication dialogs. The build script compiles assets/gitr.ico with the Windows resource compiler. To regenerate its sizes after changing the artwork, use ImageMagick:

magick assets/icon-256.png -define icon:auto-resize=256,128,64,48,32,16 assets/gitr.ico

Keyboard shortcuts

Shortcut Action
⌘/Ctrl O Open repository
⌘/Ctrl W Close tab
Ctrl Tab / Ctrl ⇧ Tab Next / previous tab
⌘/Ctrl R, F5 Refresh
⌘/Ctrl F Search commits
⌘/Ctrl 1 / 2 Local changes / all commits
⌘/Ctrl Enter Commit
⇧⌘/Ctrl F, L, P, B Fetch, pull, push, new branch
↑ / ↓ Move through commits

Development

cargo test runs the unit tests, including end-to-end hunk and line staging against a temporary repository.

With --features screenshot, setting GITR_SCREENSHOT=out.png saves a window screenshot and exits (see src/devshot.rs).

License

MIT

About

A cross platform git client

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages