diff --git a/README.md b/README.md new file mode 100644 index 0000000..3057f1a --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +

+ +

+ +

gites

+ +

+ A colorful viewer for the history of a git repository.
+ Linux and Windows desktop app, driven from the keyboard. +

+ +

+ Download · + Keys · + Build from source +

+ +![The commit graph of a small repository, with branches, merges, tags and the preview panel for the selected commit](docs/screenshots/graph.png) + +## What it does + +- **Draws the commit graph.** Every branch gets its own color. Labels on each commit show + local branches, remote branches and tags, and the checked-out commit is ringed. +- **Hides what you don't need.** Hide one branch with its eye button in the sidebar, or + with h on a commit. Type a pattern such as `prototypes/*` and choose + **hide** or **show only**. gites remembers the filters of each repository. +- **Folds long straight stretches.** Commits in a row that have no branch, tag, fork or + merge fold into one dotted line. c folds all of them, space + opens or closes the one at the selected commit. +- **Shows the selected commit** in a panel at the bottom: the full message, the author + and committer, the hash (click to copy), the parents (click to go there), and the + files it changed with the number of added and removed lines. +- **Shows what changed in a file.** Click a file in the panel, or press Enter + for the first one. Choose one of three layouts with v: + - **One column**, as `git diff` prints it. + - **Side by side**, the old file on the left and the new one on the right. + - **Inline**, one line per changed line, with removed words struck out and added words + marked. Best for prose, such as Markdown. + + In every layout, the words that changed inside a line are marked. +- **Opens other repositories** from a list of recent ones, or from a folder picker + (o). +- **Stays current.** gites reloads the repository when its window gets focus again. + +![The diff of one file, with old and new side by side and the changed words marked](docs/screenshots/diff.png) + +## Install + +Download a package from the [releases page](https://git.wrobel.it/szaman/gites/releases): + +| System | File | +|---|---| +| Debian, Ubuntu | `gites__amd64.deb` | +| Fedora, openSUSE | `gites--1.x86_64.rpm` | +| Any Linux | `gites__amd64.AppImage` | +| Windows, installer | `gites__x64-setup.exe` | +| Windows, no install | `gites__x64_portable.exe` | + +gites runs the `git` command, so git must be installed and on your `PATH`. + +## Use + +```sh +gites # the repository in the current folder +gites ~/code/my-project # another repository +``` + +## Keys + +**In the commit graph** + +| Key | Action | +|---|---| +| ↑ ↓ or k j | Select the previous or next commit | +| PgUp PgDn | Move one screen up or down | +| g G or Home End | Go to the first or last commit | +| Enter | Show what changed in the first file of the commit | +| space | Fold or unfold the straight stretch at the selected commit | +| c | Fold or unfold all straight stretches | +| h | Hide the branch of the selected commit | +| y | Copy the short hash | +| / | Type a filter pattern | +| p | Show or hide the preview panel | +| o | Open another repository | +| r | Reload | + +**In a file's diff** + +| Key | Action | +|---|---| +| ↑ ↓ or k j | Scroll by one line | +| PgUp PgDn | Scroll by one screen | +| g G or Home End | Go to the top or bottom | +| n N | Go to the next or previous change | +| ] [ | Show the next or previous file of the commit | +| v | Switch the layout: one column, side by side, inline | +| Esc | Go back to the commit graph | + +## Where gites keeps its settings + +The window layout, the diff layout and the recent repositories are kept in +`settings.json`, and the filters of each repository in `filters.json`. Both files are in +the `gites` folder of your data folder: `~/.local/share/gites` on Linux, +`%APPDATA%\gites` on Windows. + +## Build from source + +gites is a [Tauri](https://tauri.app) app: the window is Vue and TypeScript, and the part +that runs git is Rust. [mise](https://mise.jdx.dev) installs the right versions of Node, +Bun and Rust. + +On Linux, Tauri also needs the WebKitGTK development packages. `scripts/ci-setup.sh` +lists them for Debian and Ubuntu. + +```sh +mise install # Node, Bun and Rust +bun install # packages for the window code + +mise run dev # run gites with live reload; add a path to open a repository +mise run test # unit tests for the window code and the Rust code +mise run check # type checks for both +mise run install # build a release binary and install it as ~/.local/bin/gites +``` + +Pushing a tag such as `v1.2.3` builds the Linux and Windows packages and publishes them +on the releases page. diff --git a/docs/screenshots/diff.png b/docs/screenshots/diff.png new file mode 100644 index 0000000..8b45a46 Binary files /dev/null and b/docs/screenshots/diff.png differ diff --git a/docs/screenshots/graph.png b/docs/screenshots/graph.png new file mode 100644 index 0000000..e5b7a44 Binary files /dev/null and b/docs/screenshots/graph.png differ