gitui/README.md

95 lines
2.9 KiB
Markdown
Raw Normal View History

2020-04-03 17:47:30 +03:00
<h1 align="center">
2020-04-13 02:53:59 +03:00
<img width="400px" src="assets/logo.png" />
2020-03-24 23:40:19 +03:00
2020-05-07 18:32:33 +03:00
![CI][s0] [![crates][s1]][l1] ![MIT][s2] [![UNSAFE][s3]][l3] [![ITCH][s4]][l4]
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-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-03-23 16:59:46 +03:00
2020-03-18 13:40:54 +03:00
blazing fast terminal-ui for git written in rust
2020-03-16 19:20:28 +03:00
2020-04-11 12:29:08 +03:00
![](assets/demo.gif)
2020-03-18 02:58:31 +03:00
2020-04-10 15:27:27 +03:00
# features
2020-03-23 17:16:54 +03:00
2020-03-29 18:17:38 +03:00
* fast and intuitive key only control
* context based help (**no** need to remember any hot-key)
2020-04-10 15:27:27 +03:00
* inspect/commit changes (incl. hooks: *commit-msg*/*post-commit*)
* (un)stage files/hunks, revert/reset files/hunk
2020-05-05 15:27:24 +03:00
* browse commit log
2020-03-27 03:55:26 +03:00
* scalable ui layout
2020-03-23 17:16:54 +03:00
* async [input polling](assets/perf_compare.jpg) and
* async git API for fluid control
2020-04-10 15:27:27 +03:00
# known limitations
* [core.hooksPath](https://git-scm.com/docs/githooks) config not supported
2020-04-10 15:31:39 +03:00
* revert/reset hunk in working dir (see [#11](https://github.com/extrawurst/gitui/issues/11))
2020-04-10 15:27:27 +03:00
# motivation
2020-03-18 02:58:31 +03:00
2020-03-19 19:59:31 +03:00
I do most of my git usage in a terminal but I frequently found myself using git UIs for some use cases like: index/commit, diff, stash and log.
Over the last 2 years my go-to GUI tool for this was [fork](https://git-fork.com) because it was not bloated, snappy and free. Unfortunately the *free* part will [change soon](https://github.com/ForkIssues/TrackerWin/issues/571) and so I decided to build a fast & simple terminal tool myself to copy the fork features i am using the most.
2020-03-18 02:23:06 +03:00
2020-04-10 15:27:27 +03:00
# installation
For the time being this product is considered alpha and **not** production ready.
2020-03-20 04:12:19 +03:00
2020-04-28 16:51:24 +03:00
## release binaries
see [releases](https://github.com/extrawurst/gitui/releases)
## homebrew (macos)
2020-04-10 15:27:27 +03:00
```
brew install extrawurst/tap/gitui
```
## install from source
2020-03-20 12:37:35 +03:00
### requirements
install `rust`/`cargo`: https://www.rust-lang.org/tools/install
min rust version: `1.42`
2020-03-20 12:37:35 +03:00
2020-03-24 23:34:11 +03:00
### cargo install
2020-03-24 23:57:25 +03:00
the simplest way to start playing around with `gitui` is to have `cargo` build/install it:
2020-03-20 04:12:19 +03:00
```
2020-03-24 23:57:25 +03:00
cargo install gitui
2020-03-20 04:12:19 +03:00
```
2020-04-10 15:27:27 +03:00
# diagnostics:
2020-03-20 04:12:19 +03:00
to enable logging:
2020-03-20 04:12:19 +03:00
```
2020-03-24 23:57:25 +03:00
GITUI_LOGGING=true gitui
2020-03-20 04:12:19 +03:00
```
this will log to:
* `$HOME/Library/Caches/gitui/gitui.log` (mac)
* `$XDG_CACHE_HOME/gitui/gitui.log` (linux using `XDG`)
* `$HOME/.cache/gitui/gitui.log` (linux)
# color theme
to change the colors of the program you have to modify `theme.ron` file
[Ron format](https://github.com/ron-rs/ron) located at config path (same as log paths). the list of valid
colors can be found in [ColorDef](./src/ui/style.rs#ColorDef) struct. note that rgb colors might not be available
on some platforms.
2020-03-25 15:02:09 +03:00
# inspiration
2020-03-18 02:58:31 +03:00
2020-03-25 15:02:09 +03:00
* https://github.com/jesseduffield/lazygit
2020-03-25 18:00:03 +03:00
* https://github.com/jonas/tig
2020-04-11 12:28:35 +03:00
* https://github.com/git-up/GitUp (would be nice to comeup with a way to have the map view available in a terminal tool)