simple terminal heatmap for your local git repos
Go to file
Wynd 6f30df1d6a Updated the README 2024-11-05 11:36:54 +02:00
src Chunk based heatmap for wrapping on multiple rows 2024-11-03 00:13:02 +02:00
.editorconfig First impl, a heatmap with some clap configs 2024-08-15 22:09:51 +03:00
.gitignore Small optimization so it stops fetching and converting all commits 2024-08-17 02:40:20 +03:00
Cargo.lock Added git2 dep to actually get all the local branches 2024-10-21 23:45:34 +03:00
Cargo.toml Added git2 dep to actually get all the local branches 2024-10-21 23:45:34 +03:00
README.md Updated the README 2024-11-05 11:36:54 +02:00
rust-toolchain.toml New numbers formatting for the heatmap 2024-10-12 11:59:13 +03:00
rustfmt.toml First impl, a heatmap with some clap configs 2024-08-15 22:09:51 +03:00
screenshot.png Added a README file 2024-08-17 23:31:25 +03:00

README.md

git-heatmap

simple but customizable heatmap for your local git repos written in rust.

screenshot

Install

Using cargo

  • run the following command cargo install git-heatmap

From source using cargo

  • clone the repository
  • cd into the repository
  • run cargo install --path ., cargo will build a release build and install it, for more info check the cargo-install docs

Usage

# can be ran in any directory that is a valid git repository
$ git-heatmap

# use any local repository from your system
$ git-heatmap -r "/path/to/repo"

# supports multiple repository
$ git-heatmap -r "/path/to/repo" -r "/other/repo"

# set what branch to check
# if no -b flag is given all local branches of the repository will be checked
$ git-heatmap -r "/path/to/repo" -b "main"

# can also just pass the branches if you're already in a repository
$ git-heatmap -b "main"

# manually set which branches to check (separated by space)
$ git-heatmap -r "/path/to/repo" -b "main other test"

# supports checking different branches per repository however 
# the number of -b flags needs to match the number of -r flags
$ git-heatmap -r "/path/to/repo" -b "main" -r "/other/repo" -b "test"

# an empty string can be passed for the -b flag so all branches get checked 
# or to comply with the same number of branch lists per repo lists rule from above
$ git-heatmap -r "/path/to/repo" -b "main" -r "other/repo" -b ""

# alternatively you can simply pass a root directory and let the program search for all git projects
# do be warned that doing so means you're losing the customization aspect of choosing
# which branches should be checked per repo, in this case all branches will be checked.
$ git-heatmap --root-dir "/path"

# when using the --root-dir option you can also ignore folders of repos you don't want to count
$ git-heatmap --root-dir "/path" -i "project"

# by default merges are counted so using --no-merges ensures they won't be counted
$ git-heatmap --no-merges

# splits the heatmap per month instead of one big chunk
$ git-heatmap --split-months

# by default it colors every day based on which one the maximum number of commits in a visible day
# shading all the others accordingly, with by-amount it will instead color each day based on 
# the amount of commits in that day
$ git-heatmap --counting by-amount

# by default the format uses characters to represent days and colors them based on how many commits
# that day has, using the numbers format replaces those characters with the actual number of commits
# maxed at 99
$ git-heatmap --format numbers

# sets how many months per row to display
$ git-heatmap --months-per-row 6

# filter by one or multiple authors (respecting the .mailmap settings) 
# without an -a flag all authors will be checked
$ git-heatmap -a "username" -a "other"

# choose from when to start the checking
# if no --since flag is given it will start the search one year from the current date
# if no --until date is given it will check for either 365 days since the start date or 
# until the current day, depending on which one is closer
$ git-heatmap --since "2013-08-23"

# or choose a time span, both --since and --until must use a YYYY-MM-DD format
$ git-heatmap --since "2013-08-23" --until "2024-08-23"