• Stars
    star
    496
  • Rank 88,807 (Top 2 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command line tool to show clear git graphs arranged for your branching model

git-graph

Tests GitHub Crate MIT license

A command line tool to visualize Git history graphs in a comprehensible way, following different branching models.

The image below shows an example using the GitFlow branching model for a comparison between graphs generated by git-graph (far left) versus other tools and Git clients.

GitFlow was chosen for its complexity, while any other branching model is supported, including user-defined ones.

Graph comparison between tools

Decide for yourself which graph is the most comprehensible. 😎

If you want an interactive Git terminal application, see git-igitt, which is based on git-graph.

Features

  • View structured graphs directly in the terminal
  • Pre-defined and custom branching models and coloring
  • Different styles, including ASCII-only (i.e. no "special characters")
  • Custom commit formatting, like with git log --format="..."

Installation

Pre-compiled binaries

  1. Download the latest binaries for your platform
  2. Unzip somewhere
  3. Optional: add directory git-graph to your PATH environmental variable

Using cargo

In case you have Rust installed, you can install with cargo:

cargo install git-graph

Usage

For detailed information, see the manual.

For basic usage, run the following command inside a Git repository's folder:

git-graph

Note: git-graph needs to be on the PATH, or you need use the full path to git-graph:

C:/path/to/git-graph/git-graph

Branching models

Run git-graph with a specific model, e.g. simple:

git-graph --model simple

Alternatively, set the model for the current repository permanently:

git-graph model simple

Get help

For the full CLI help describing all options, use:

git-graph -h
git-graph --help

For styles and commit formatting, see the manual.

Custom branching models

Branching models are configured using the files in APP_DATA/git-graph/models.

  • Windows: C:\Users\<user>\AppData\Roaming\git-graph
  • Linux: ~/.config/git-graph
  • OSX: ~/Library/Application Support/git-graph

File names of any .toml files in the models directory can be used in parameter --model, or via sub-command model. E.g., to use a branching model defined in my-model.toml, use:

git-graph --model my-model

For details on how to create your own branching models see the manual, section Custom branching models.

Limitations

  • Summaries of merge commits (i.e. 1st line of message) should not be modified! git-graph needs them to categorize merged branches.
  • Supports only the primary remote repository origin.
  • Does currently not support "octopus merges" (i.e. no more than 2 parents)
  • On Windows PowerShell, piping to file output does not work properly (changes encoding), so you may want to use the default Windows console instead

Contributing

Please report any issues and feature requests in the issue tracker.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

More Repositories

1

git-igitt

Interactive, cross-platform Git terminal application with clear git graphs arranged for your branching model
Rust
152
star
2

arche

Arche is an archetype-based Entity Component System (ECS) for Go.
Go
125
star
3

yarner

Literate Programming command line tool for Markdown
Rust
31
star
4

tiny-world

A tiny, slow-paced world and colony building game.
Go
29
star
5

chrono-photo

Chronophotography command line tool and library in Rust.
Rust
13
star
6

arche-model

Everything you need to rapidly build a model with the Arche Entity Component System (ECS).
Go
12
star
7

cdda-tools

Command line tools for Cataclysm DDA
Python
10
star
8

tom

Tom -- Terminal app for Open-Meteo forecasts
Go
9
star
9

dirstat

Command line tool to analyze and visualize disk usage
Go
7
star
10

arche-serde

JSON serialization and deserialization for the Arche Entity Component System (ECS).
Go
5
star
11

planetary-defense

🪐 Planetary defense and colonization game in Godot and Rust
GDScript
5
star
12

track

Track is a time tracking command line tool
Go
5
star
13

arche-pixel

OpenGL graphics and plots for the Arche Entity Component System (ECS).
Go
4
star
14

print-prep

Command line tool for photo print preparation, written in Rust
Rust
4
star
15

beecs

The BEEHAVE honeybee model, re-implemented with Go and ECS
Go
3
star
16

arche-demo

Demo for Arche, the Go Entity Component System (ECS)
Go
2
star
17

Sonic-LP

Sonic Pi - Literate Music Programming
Ruby
2
star
18

kohonen

A Self-organizing Maps (SOM) / Kohonen networks library and command line tool in Rust.
Rust
2
star
19

bbn

Bayesian Belief Network CLI/TUI tool and Go module.
Go
2
star
20

easy_graph

A simple Rust wrapper for easy plotting and drawing, wrapping the crates plotters and minifb.
Rust
1
star
21

yarner-block-links

Yarner plugin that creates links to all referenced end referencing blocks
Rust
1
star
22

Graviton

A 2D platformer puzzle game, featuring unique gravity mechanics
GDScript
1
star
23

isso

isso -- Iterative Samling Schedule Optimization
Go
1
star
24

beecs-ui

GUI for the beecs honeybee model
Go
1
star
25

ppa

Point pattern analysis library and command line tool in Rust
Rust
1
star
26

yarner-toc

Yarner plugin to add a Table of Content
Rust
1
star
27

yarner-bib

Yarner plugin for BibTeX citations
Rust
1
star
28

reveal-svg-smil

Control SVG/SMIL animations from reveal.js slideshows
JavaScript
1
star
29

xwrd

xwrd is a word matching and anagram command line tool
Go
1
star
30

yarner-fold-code

Yarner plugin that puts all code blocks into collapsed <details> tags
Rust
1
star
31

beecs-cli

Command line interface for the beecs honeybee model
Go
1
star
32

som

Self-organizing maps in Go
Go
1
star