2020-04-03 17:47:30 +03:00
< h1 align = "center" >
2020-06-08 21:20:52 +03:00
< img width = "300px" src = "assets/logo.png" / >
2020-03-24 23:40:19 +03:00
2023-08-21 14:14:42 +03:00
[![CI][s0]][l0] [![crates][s1]][l1] ![MIT][s2] [![UNSAFE][s3]][l3] [![ITCH][s4]][l4] [![TWEET][s6]][l6] [![dep_status][s7]][l7]
2020-06-16 22:48:52 +03:00
2020-04-03 17:47:30 +03:00
< / h1 >
2020-03-31 12:41:54 +03:00
2020-03-26 19:34:51 +03:00
[s0]: https://github.com/extrawurst/gitui/workflows/CI/badge.svg
2020-07-04 16:47:06 +03:00
[l0]: https://github.com/extrawurst/gitui/actions
2020-03-24 23:40:19 +03:00
[s1]: https://img.shields.io/crates/v/gitui.svg
[l1]: https://crates.io/crates/gitui
2020-03-23 16:59:46 +03:00
[s2]: https://img.shields.io/badge/license-MIT-blue.svg
2020-04-10 11:52:31 +03:00
[s3]: https://img.shields.io/badge/unsafe-forbidden-success.svg
[l3]: https://github.com/rust-secure-code/safety-dance/
2020-05-07 18:32:33 +03:00
[s4]: https://img.shields.io/badge/itch.io-ok-green
[l4]: https://extrawurst.itch.io/gitui
2020-07-08 19:52:12 +03:00
[s6]: https://img.shields.io/twitter/follow/extrawurst?label=follow& style=social
[l6]: https://twitter.com/intent/follow?screen_name=extrawurst
2023-08-07 15:02:20 +03:00
[s7]: https://deps.rs/repo/github/extrawurst/gitui/status.svg
[l7]: https://deps.rs/repo/github/extrawurst/gitui
2020-03-23 16:59:46 +03:00
2021-05-30 11:21:33 +03:00
< h5 align = "center" > GitUI provides you with the comfort of a git GUI but right in your terminal< / h1 >
2020-03-16 19:20:28 +03:00
2021-04-12 00:06:39 +03:00
![](demo.gif)
2020-03-18 02:58:31 +03:00
2021-04-21 15:33:14 +03:00
## <a name="table-of-contents"></a> Table of Contents
1. [Features ](#features )
2021-05-30 11:21:33 +03:00
2. [Motivation ](#motivation )
3. [Benchmarks ](#bench )
2021-04-21 15:33:14 +03:00
4. [Roadmap ](#roadmap )
5. [Limitations ](#limitations )
6. [Installation ](#installation )
7. [Build ](#build )
2022-04-24 19:58:50 +03:00
8. [FAQs ](#faqs )
9. [Diagnostics ](#diagnostics )
10. [Color Theme ](#theme )
11. [Key Bindings ](#bindings )
12. [Sponsoring ](#sponsoring )
13. [Inspiration ](#inspiration )
2021-04-21 15:33:14 +03:00
## 1. <a name="features"></a> Features <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-05-27 15:03:21 +03:00
2020-06-16 22:48:52 +03:00
- Fast and intuitive **keyboard only** control
- Context based help (**no need to memorize** tons of hot-keys)
2023-12-16 02:07:54 +03:00
- Inspect, commit, and amend changes (incl. hooks: *pre-commit* ,*commit-msg*,*post-commit*,*prepare-commit-msg*)
2021-03-12 14:04:37 +03:00
- Stage, unstage, revert and reset files, hunks and lines
2021-04-11 18:32:16 +03:00
- Stashing (save, pop, apply, drop, and inspect)
2023-08-21 14:14:42 +03:00
- Push / Fetch to / from remote
2021-04-06 19:58:13 +03:00
- Branch List (create, rename, delete, checkout, remotes)
2023-08-21 14:14:42 +03:00
- Browse / **Search** commit log, diff committed changes
- Responsive terminal UI
2020-06-16 22:48:52 +03:00
- Async git API for fluid control
2022-08-31 11:51:08 +03:00
- Submodule support
2020-05-27 15:00:24 +03:00
2021-05-30 11:21:33 +03:00
## 2. <a name="motivation"></a> Motivation <small><sup>[Top ▲](#table-of-contents)</sup></small>
I do most of my git work in a terminal but I frequently found myself using git GUIs for some use-cases like: index, commit, diff, stash, blame and log.
Unfortunately popular git GUIs all fail on giant repositories or become unresponsive and unusable.
GitUI provides you with the user experience and comfort of a git GUI but right in your terminal while being portable, fast, free and opensource.
## 3. <a name="bench"></a> Benchmarks <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-05-27 15:00:24 +03:00
2020-06-17 18:05:34 +03:00
For a [RustBerlin meetup presentation ](https://youtu.be/rpilJV-eIVw?t=5334 ) ([slides](https://github.com/extrawurst/gitui-presentation)) I compared `lazygit` ,`tig` and `gitui` by parsing the entire Linux git repository (which contains over 900k commits):
2020-04-10 15:27:27 +03:00
2021-05-12 16:29:56 +03:00
| | Time | Memory (GB) | Binary (MB) | Freezes | Crashes |
| --------- | ---------- | ----------- | ----------- | --------- | --------- |
| `gitui` | **24 s** ✅ | **0.17** ✅ | 1.4 | **No** ✅ | **No** ✅ |
| `lazygit` | 57 s | 2.6 | 16 | Yes | Sometimes |
| `tig` | 4 m 20 s | 1.3 | **0.6** ✅ | Sometimes | **No** ✅ |
2020-04-10 15:27:27 +03:00
2021-04-21 15:33:14 +03:00
## 4. <a name="roadmap"></a> Road(map) to 1.0 <small><sup>[Top ▲](#table-of-contents)</sup></small>
These are the high level goals before calling out `1.0` :
* visualize branching structure in log tab ([#81](https://github.com/extrawurst/gitui/issues/81))
2021-07-12 15:36:41 +03:00
* interactive rebase ([#32](https://github.com/extrawurst/gitui/issues/32))
2021-04-21 15:33:14 +03:00
## 5. <a name="limitations"></a> Known Limitations <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-06-16 18:00:32 +03:00
2022-05-11 13:41:46 +03:00
- no sparse repo support (see [#1226 ](https://github.com/extrawurst/gitui/issues/1226 ))
2021-05-28 12:52:30 +03:00
- no support for GPG signing (see [#97 ](https://github.com/extrawurst/gitui/issues/97 ))
2022-01-22 18:47:47 +03:00
- no git-lfs support (see [#1089 ](https://github.com/extrawurst/gitui/discussions/1089 ))
2022-01-28 01:37:20 +03:00
- *credential.helper* for https needs to be **explicitly** configured (see [#800 ](https://github.com/extrawurst/gitui/issues/800 ))
2020-06-16 18:00:32 +03:00
2020-06-16 22:48:52 +03:00
Currently, this tool does not fully substitute the _git shell_ , however both tools work well in tandem.
2020-06-16 18:00:32 +03:00
2021-05-31 21:31:20 +03:00
The priorities for `gitui` are on features that are making me mad when done on the _git shell_ , like stashing, staging lines or hunks. Eventually, I will be able to work on making `gitui` a one stop solution - but for that I need help - this is just a spare time project for now.
2020-06-16 18:00:32 +03:00
2020-06-16 22:48:52 +03:00
All support is welcomed! Sponsors as well! ❤️
2020-06-16 18:00:32 +03:00
2021-04-21 15:33:14 +03:00
## 6. <a name="installation"></a> Installation <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-06-16 18:00:32 +03:00
2023-09-19 20:52:30 +03:00
GitUI is in beta and may contain bugs and missing features. However, for personal use it is reasonably stable and is being used while developing itself.
2023-08-30 16:53:05 +03:00
< a href = "https://repology.org/project/gitui/versions" >
< img src = "https://repology.org/badge/vertical-allrepos/gitui.svg" alt = "Packaging status" align = "right" >
< / a >
2023-09-19 20:52:30 +03:00
### Various Package Managers
< details >
< summary > Install Instructions< / summary >
2020-04-10 15:27:27 +03:00
2023-11-21 10:12:33 +03:00
##### [Arch Linux](https://archlinux.org/packages/extra/x86_64/gitui/)
2020-05-30 07:55:19 +03:00
```sh
2021-03-16 21:00:54 +03:00
pacman -S gitui
2020-05-30 07:55:19 +03:00
```
2023-09-19 20:52:30 +03:00
##### Fedora
2020-04-28 16:51:24 +03:00
2020-05-28 22:25:34 +03:00
```sh
sudo dnf install gitui
```
2020-04-28 16:51:24 +03:00
2023-09-19 20:52:30 +03:00
##### Gentoo
2020-11-17 18:45:58 +03:00
Available in [dm9pZCAq overlay ](https://github.com/gentoo-mirror/dm9pZCAq )
```sh
sudo eselect repository enable dm9pZCAq
sudo emerge --sync dm9pZCAq
sudo emerge dev-vcs/gitui::dm9pZCAq
```
2023-10-18 16:16:40 +03:00
##### [openSUSE](https://software.opensuse.org/package/gitui)
2023-03-29 15:17:32 +03:00
```sh
sudo zypper install gitui
```
2023-09-19 20:52:30 +03:00
##### Homebrew (macOS)
2020-04-10 15:27:27 +03:00
2020-06-16 22:48:52 +03:00
```sh
2020-06-16 22:05:34 +03:00
brew install gitui
2020-04-10 15:27:27 +03:00
```
2023-09-19 20:52:30 +03:00
##### [MacPorts (macOS)](https://ports.macports.org/port/gitui/details/)
2022-06-16 11:51:17 +03:00
```sh
port install gitui
```
2023-09-19 20:52:30 +03:00
##### [Winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/StephanDilly/gitui) (Windows)
2022-09-18 15:09:19 +03:00
```
winget install gitui
```
2023-09-19 20:52:30 +03:00
##### [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/gitui.json) (Windows)
2020-09-15 09:33:09 +03:00
```
scoop install gitui
```
2023-09-19 20:52:30 +03:00
##### [Chocolatey](https://chocolatey.org/packages/gitui) (Windows)
2020-10-11 18:14:02 +03:00
```
choco install gitui
```
2023-09-19 20:52:30 +03:00
##### [Nix](https://search.nixos.org/packages?channel=unstable&show=gitui&from=0&size=50&sort=relevance&query=gitui) (Nix/NixOS)
2021-02-25 19:31:36 +03:00
Nixpkg
```
nix-env -iA nixpkgs.gitui
```
NixOS
```
nix-env -iA nixos.gitui
```
2023-09-19 20:52:30 +03:00
##### [Termux](https://github.com/termux/termux-packages/tree/master/packages/gitui) (Android)
2022-02-20 23:49:53 +03:00
```
pkg install gitui
```
2023-09-19 20:52:30 +03:00
##### [Anaconda](https://anaconda.org/conda-forge/gitui)
2023-08-11 00:34:27 +03:00
```
conda install -c conda-forge gitui
```
2023-09-19 20:52:30 +03:00
< / details >
### Release Binaries
2020-05-28 22:25:34 +03:00
2020-06-16 22:48:52 +03:00
[Available for download in releases ](https://github.com/extrawurst/gitui/releases )
2020-05-28 22:25:34 +03:00
2020-06-16 22:48:52 +03:00
Binaries available for:
2020-03-20 12:37:35 +03:00
2023-04-07 04:12:14 +03:00
### Linux
- gitui-linux-musl.tar.gz (linux on x86_64)
- gitui-linux-aarch64.tar.gz (linux on 64 bit arm)
- gitui-linux-arm.tar.gz
- gitui-linux-armv7.tar.gz
All contain a single binary file
### macOS
- gitui-mac.tar.gz (intel Mac, uses Rosetta on Apple silicon, single binary)
### Windows
- gitui-win.tar.gz (single 64bit binary)
- gitui.msi (64bit Installer package)
2020-03-20 12:37:35 +03:00
2021-04-21 15:33:14 +03:00
## 7. <a name="build"></a> Build <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-03-20 12:37:35 +03:00
2020-06-16 22:48:52 +03:00
### Requirements
2020-03-24 23:34:11 +03:00
2024-02-19 13:27:34 +03:00
- Minimum supported `rust` /`cargo` version: `1.70`
2020-06-16 22:48:52 +03:00
- See [Install Rust ](https://www.rust-lang.org/tools/install )
2020-03-20 04:12:19 +03:00
2023-05-10 14:45:53 +03:00
- To build openssl dependency (see https://docs.rs/openssl/latest/openssl/)
- perl >= 5.12 (strawberry perl works for windows https://strawberryperl.com/)
- a c compiler (msvc, gcc or clang, cargo will find it)
- To run the complete test suite python is required (and it must be invokable as `python` )
2020-06-16 22:48:52 +03:00
### Cargo Install
2020-03-20 04:12:19 +03:00
2024-02-21 19:29:51 +03:00
The simplest way to start playing around with `gitui` is to have `cargo` build and install it with `cargo install gitui --locked` . If you are not familiar with rust and cargo: [Getting Started with Rust ](https://doc.rust-lang.org/book/ch01-00-getting-started.html )
2021-10-13 16:32:17 +03:00
### Cargo Features
#### trace-libgit
enable `libgit2` tracing
works if `libgit2` builded with `-DENABLE_TRACE=ON`
this feature enabled by default, to disable: `cargo install --no-default-features`
2020-03-20 04:12:19 +03:00
2022-04-24 19:58:50 +03:00
## 8. <a name="faqs"></a> FAQs <small><sup>[Top ▲](#table-of-contents)</sup></small>
see [FAQs page ](./FAQ.md )
## 9. <a name="diagnostics"></a> Diagnostics <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-03-20 04:12:19 +03:00
2020-06-16 22:48:52 +03:00
To run with logging enabled run `gitui -l` .
2020-04-22 15:24:26 +03:00
2020-06-16 22:48:52 +03:00
This will log to:
- macOS: `$HOME/Library/Caches/gitui/gitui.log`
- Linux using `XDG` : `$XDG_CACHE_HOME/gitui/gitui.log`
- Linux: `$HOME/.cache/gitui/gitui.log`
2021-03-10 18:18:17 +03:00
- Windows: `%LOCALAPPDATA%/gitui/gitui.log`
2020-06-16 22:48:52 +03:00
2022-04-24 19:58:50 +03:00
## 10. <a name="theme"></a> Color Theme <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-05-19 21:19:30 +03:00
2020-05-20 13:00:17 +03:00
![](assets/light-theme.png)
2020-06-16 22:48:52 +03:00
`gitui` should automatically work on both light and dark terminal themes.
However, you can customize everything to your liking: See [Themes ](THEMES.md ).
2020-05-19 21:19:30 +03:00
2022-04-24 19:58:50 +03:00
## 11. <a name="bindings"></a> Key Bindings <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-08-30 13:09:06 +03:00
The key bindings can be customized: See [Key Config ](KEY_CONFIG.md ) on how to set them to `vim` -like bindings.
2022-04-24 19:58:50 +03:00
## 12. <a name="sponsoring"></a> Sponsoring <small><sup>[Top ▲](#table-of-contents)</sup></small>
2021-04-27 14:24:45 +03:00
[![github ](https://img.shields.io/badge/-GitHub%20Sponsors-fafbfc?logo=GitHub%20Sponsors )](https://github.com/sponsors/extrawurst)
2022-04-24 19:58:50 +03:00
## 13. <a name="inspiration"></a> Inspiration <small><sup>[Top ▲](#table-of-contents)</sup></small>
2020-03-18 02:58:31 +03:00
2020-06-16 22:48:52 +03:00
- [lazygit ](https://github.com/jesseduffield/lazygit )
- [tig ](https://github.com/jonas/tig )
- [GitUp ](https://github.com/git-up/GitUp )
- It would be nice to come up with a way to have the map view available in a terminal tool
2020-10-10 12:45:56 +03:00
- [git-brunch ](https://github.com/andys8/git-brunch )