Compare commits

...

58 commits

Author SHA1 Message Date
arzzen 0f9481a507
Merge pull request #199 from git-quick-stats/task/issues-3
Enhance daily statistics tracking
2026-04-18 14:15:20 +02:00
arzzen 0dc1fcf0c4 Refactor myDailyStats function for improved readability and performance 2026-04-13 12:15:27 +02:00
arzzen eebe147b30
Merge pull request #200 from git-quick-stats/task/issues-171
Add option to list new contributors since a specified git tag
2026-04-10 12:34:53 +02:00
arzzen 322470f415 docs: clarify tag-based contributor option behavior 2026-04-10 12:32:28 +02:00
arzzen 892040c3ad Add option to list new contributors since a specified git tag 2026-04-06 10:52:09 +02:00
arzzen b424bb9c17
Merge pull request #197 from git-quick-stats/fix/issues-196
GNU date requirements for macOS and FreeBSD
2026-04-06 10:33:02 +02:00
arzzen ec986e2cb6
Merge pull request #198 from git-quick-stats/fix/issues-148 2026-04-06 07:21:47 +02:00
arzzen 0f998185e8 Enhance my daily stats 2026-04-05 17:44:54 +02:00
arzzen 0133a4a998 Enhance detailedGitStats and csvOutput functions to include merge commit statistics 2026-04-05 17:31:17 +02:00
arzzen d407af3aba GNU date requirements for macOS and FreeBSD 2026-04-05 16:55:25 +02:00
arzzen 125eec7136
Merge pull request #195 from tomice/issues/194-flatten-awk-arrays-for-bsd-awk-compat
Flatten arrays for wider awk compatibility
2025-09-02 11:46:39 +02:00
Tom Ice d61c812247 Flatten arrays for wider awk compatibility
* The current implementation of the calendar heatmap by author
  contains multidimensional arrays. This works with newer versions
  of awk, but can cause issues with systems that use an older variant
  which cannot easily handle these calculations. macOS is especially
  impacted by this.

  By flattening the arrays from a multidimensional array to a single
  dimensional array, we can maintain greater compatibility across awk
  variants without requiring the user to install additional versions
  of awk.

Addresses issue #194
2025-08-31 16:22:59 -04:00
arzzen 261262ab4e
Update Dockerfile - add coreutils 2025-08-03 18:48:37 +02:00
arzzen e968ef62b9
Merge pull request #190 from git-quick-stats/task/commits-heatmap
commits heatmap
2025-06-29 08:57:05 +02:00
arzzen 74261c1e50 smallfixes 2025-06-29 08:55:49 +02:00
arzzen 4eade09673 Merge branch 'task/commits-heatmap' of github.com:git-quick-stats/git-quick-stats into task/commits-heatmap 2025-06-28 22:25:09 +02:00
arzzen 47a9151886 fix: tput colors, local vars 2025-06-28 22:24:51 +02:00
arzzen 916d5e1e0f Merge branch 'master' of github.com:git-quick-stats/git-quick-stats into task/commits-heatmap 2025-06-25 17:50:40 +02:00
arzzen 17a9d1427b
Update git-quick-stats 2025-06-22 20:06:31 +02:00
arzzen 091562d4f8
Merge pull request #191 from git-quick-stats/task/citation-file
citation file
2025-06-22 20:03:57 +02:00
arzzen 748576b541 citation file 2025-06-22 20:03:38 +02:00
arzzen f43ab22172 remove sponsors 2025-06-22 19:51:06 +02:00
arzzen 4d2e52aa6d commits heatmap 2025-06-22 19:49:49 +02:00
arzzen 08c0ca1d85
Update README.md 2025-06-17 19:24:24 +02:00
arzzen e8843da10e
Merge pull request #189 from git-quick-stats/134-feature-request-sorting-contribution-stats
Sorting contribution stats
2025-06-17 19:03:55 +02:00
arzzen 376887a394 update manpage 2025-06-17 19:01:38 +02:00
arzzen cebb5a8f48
Merge pull request #188 from git-quick-stats/task/issue-116
_MENU_THEME=none
2025-06-17 18:52:01 +02:00
arzzen 343351b762 update manpage 2025-06-17 18:49:38 +02:00
arzzen 95136d3f92 add filter ignored authors 2025-06-16 14:40:49 +02:00
arzzen 79c735c814 fix backslash 2025-06-16 14:36:11 +02:00
arzzen ec6a95d2ef cleanup 2025-06-16 14:33:03 +02:00
arzzen b65b100cd8 fix tests 2025-06-16 14:29:24 +02:00
arzzen dd7719c3b0 sorting contribution stats 2025-06-16 14:03:21 +02:00
arzzen c34ceb4c0e _MENU_THEME=none 2025-06-16 08:55:00 +02:00
arzzen 850b7453eb
Merge pull request #187 from FloezeTv/fix/default-until-date-locale 2025-06-15 15:32:51 +02:00
FloezeTv 5063d1aad7
Fix default until-date in other locales
The default until-date used `date` with the system's default locale
as `date` produces localized output by default.
However, `date -d` cannot parse this localized output
but requires a locale independent format:
https://www.gnu.org/software/coreutils/manual/html_node/Options-for-date.html#index-_002dd-19
This sets the locale to a format parsable by `date` as in the article.
2025-06-15 14:03:10 +02:00
arzzen 53b9971cf7 fix tests 2025-06-15 13:30:16 +02:00
arzzen eec6d53ce9
Merge pull request #183 from git-quick-stats/feat/activity-calendar
Activity calendar by author
2025-06-14 19:04:01 +02:00
arzzen d06a7ca090
Merge branch 'master' into feat/activity-calendar 2025-06-14 19:03:52 +02:00
arzzen 462439a855
Merge pull request #184 from git-quick-stats/task/ignore-authors
Ignore authors #141
2025-06-14 19:02:48 +02:00
arzzen c467a9694b merge 2025-06-14 14:48:39 +02:00
arzzen d4f71cfdad removed unuse arrays 2025-06-14 14:43:14 +02:00
arzzen 88e369503e link correction 2025-06-14 14:38:28 +02:00
arzzen afd61ce9c2 Ignore authors #141 2025-06-14 14:30:56 +02:00
arzzen e1e02024a1 Activity calendar by author 2025-06-08 19:39:29 +02:00
arzzen d1641f7bf3
Merge pull request #181 from jwilk-forks/anchor-regexps
Anchor regexps in commitsPerAuthor()
2025-06-08 19:33:43 +02:00
arzzen 8de8c43212
Merge pull request #182 from jwilk-forks/json-spelling 2025-02-27 17:49:37 +01:00
Jakub Wilk f4ec72073d Fix typo in JSON output 2025-02-24 08:40:54 +01:00
Jakub Wilk b0003bef49 Anchor regexps in commitsPerAuthor()
Fixes:

    $ git clone -q https://github.com/util-linux/util-linux.git
    $ git -C util-linux quick-stats -a | grep -w uthor
            23    uthor                                    Karel Zak              0.1%
            3     uthor                                    Ondrej Oprala          0.0%
            2     uthor                                    Samuel Thibault        0.0%
            ...
2025-02-24 08:32:23 +01:00
arzzen a833a5f431
Update .mailmap 2025-01-14 13:49:39 +01:00
arzzen 886f64f086
Merge pull request #180 from reitzig/patch-1
fix(docker): tell Git that the workdir is safe
2025-01-05 17:43:46 +01:00
Raphael 115b21a48d
fix(docker): tell Git that the workdir is safe
When bind-mounting a Git repository to the workdir, Git would complain about 'dubious ownership'.

We add an exception to the global Git config, in the way Git tells us to.
This should be safe since
- we run in a container, and
- the user can set the mount to read-only.

refs: issue #179
2025-01-03 14:00:30 +01:00
arzzen 4d515b88b3
Update LICENSE 2024-10-27 14:07:49 +01:00
arzzen 9b3c0e5db1
Merge pull request #176 from tomice/bugfix/161-changelogs-wrong-output
Address inconsistency in changelogs
2024-10-25 20:26:54 +02:00
arzzen 86ad0af8bb
Update FUNDING.yml 2024-10-25 20:18:35 +02:00
Tom Ice fb488abe3e Address inconsistency in changelogs
* Original function lacked explicit sorting by time.
  Adding sorting by time within the same day to help make
  changelogs consistent.
2024-10-12 17:16:21 -04:00
arzzen 3cce04ddad
Merge pull request #174 from tomice/master 2024-10-06 16:04:25 +02:00
Tom Ice d4e56cf557 Adjust commitsByYear() to support multiple dates
* commitsByYear() previously could only support Default-style
  dates for git log. However, a user can use a variety of different
  date formats such as relative, default, iso, rfc, short, and raw.

  This change modifies commitsByYear() to handle multiple different
  date strings

Fixes #172
2024-10-01 20:43:39 -04:00
10 changed files with 1605 additions and 884 deletions

5
.github/FUNDING.yml vendored
View file

@ -1,6 +1 @@
# These are supported funding model platforms # These are supported funding model platforms
github: [arzzen]
open_collective: git-quick-stats
ko_fi: lukasmestan
custom: ['https://lukasmestan.com/thanks/']

View file

@ -1,3 +1,3 @@
Lukas Mestan <lukas.mestan@gmail.com> Lukáš Mešťan <arzzen@users.noreply.github.com> Lukas <test@gmail.com> Lukáš <arzzen@users.noreply.github.com>
Lukas Mestan <lukas.mestan@gmail.com> arzzen Lukas <lukas@gmail.com> arzzen

25
CITATION.cff Normal file
View file

@ -0,0 +1,25 @@
cff-version: 1.2.0
title: Git Quick Stats
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name-particle: tomice
- name-particle: arzzen
identifiers:
- type: url
value: "https://github.com/git-quick-stats"
description: >-
Simple and efficient way to access various statistics
in a git repository
repository-code: "https://github.com/git-quick-stats/git-quick-stats"
url: "https://git-quick-stats.sh/"
abstract: >-
Git-quick-stats is a simple and efficient way to access
various statistics in a git repository.
keywords:
- git
- stats
license: MIT
version: 2.6.2

View file

@ -4,7 +4,7 @@ FROM alpine
COPY . /app COPY . /app
# Install required packages & build git-quick-stats # Install required packages & build git-quick-stats
RUN apk add --no-cache bash git make ncurses util-linux \ RUN apk add --no-cache bash git make ncurses coreutils util-linux \
&& cd /app \ && cd /app \
&& make install \ && make install \
&& rm -rf /app \ && rm -rf /app \
@ -23,5 +23,6 @@ ENV _GIT_SINCE= \
TERM=xterm-256color TERM=xterm-256color
WORKDIR /git WORKDIR /git
RUN git config --global --add safe.directory /git
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint" ] ENTRYPOINT [ "/usr/local/bin/docker-entrypoint" ]
CMD [ "/usr/bin/git", "quick-stats" ] CMD [ "/usr/bin/git", "quick-stats" ]

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2021 Lukáš Mešťan Copyright (c) 2024 git-quick-stats.sh
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -30,8 +30,8 @@ uninstall:
@$(TASK_DONE) @$(TASK_DONE)
reinstall: reinstall:
@curl -sO https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats @curl -sO https://raw.githubusercontent.com/git-quick-stats/git-quick-stats/master/git-quick-stats
@curl -sO https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats.1 @curl -sO https://raw.githubusercontent.com/git-quick-stats/git-quick-stats/master/git-quick-stats.1
$(MAKE) install $(MAKE) install
@$(TASK_DONE) @$(TASK_DONE)

830
README.md
View file

@ -1,397 +1,433 @@
# GIT quick statistics [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Simple%20and%20efficient%20way%20to%20access%20various%20statistics%20in%20git%20repository&url=https://github.com/arzzen/git-quick-stat&via=arzzen&hashtags=git,stats,tool,statistics,developers) # GIT quick statistics [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Simple%20and%20efficient%20way%20to%20access%20various%20statistics%20in%20git%20repository&url=https://github.com/arzzen/git-quick-stat&via=arzzen&hashtags=git,stats,tool,statistics,developers)
[![Backers on Open Collective](https://opencollective.com/git-quick-stats/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/git-quick-stats/sponsors/badge.svg)](#sponsors) [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/git-quick-stats.svg)](https://formulae.brew.sh/formula/git-quick-stats#default) [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/git-quick-stats.svg)](https://formulae.brew.sh/formula/git-quick-stats#default)
> `git-quick-stats` is a simple and efficient way to access various statistics in a git repository. > `git-quick-stats` is a simple and efficient way to access various statistics in a git repository.
> >
> Any git repository may contain tons of information about commits, contributors, and files. Extracting this information is not always trivial, mostly because there are a gadzillion options to a gadzillion git commands - I don't think there is a single person alive who knows them all. Probably not even [Linus Torvalds](https://github.com/torvalds) himself :). > Any git repository may contain tons of information about commits, contributors, and files. Extracting this information is not always trivial, mostly because there are a gadzillion options to a gadzillion git commands - I don't think there is a single person alive who knows them all. Probably not even [Linus Torvalds](https://github.com/torvalds) himself :).
![mainMenuScreenshot](https://github.com/user-attachments/assets/05a20ff1-44f6-4e44-9d62-c2c089f9ff4e) ![mainImageScreenshot](https://github.com/user-attachments/assets/7d8637a4-5a67-49f6-8724-ca7548b987c6)
## Table of Contents ## Table of Contents
[**Screenshots**](#screenshots) [**Screenshots**](#screenshots)
[**Usage**](#usage) [**Usage**](#usage)
* [**Interactive**](#interactive) - [**Interactive**](#interactive)
* [**Non-interactive**](#non-interactive) - [**Non-interactive**](#non-interactive)
* [**Command-line arguments**](#command-line-arguments) - [**Command-line arguments**](#command-line-arguments)
* [**Git log since and until**](#git-log-since-and-until) - [**Git log since and until**](#git-log-since-and-until)
* [**Git log limit**](#git-log-limit) - [**Git log limit**](#git-log-limit)
* [**Git log options**](#git-log-options) - [**Git log options**](#git-log-options)
* [**Git pathspec**](#git-pathspec) - [**Git pathspec**](#git-pathspec)
* [**Git merge view strategy**](#git-merge-view-strategy) - [**Git merge view strategy**](#git-merge-view-strategy)
* [**Color themes**](#color-themes) - [**Color themes**](#color-themes)
[**Installation**](#installation) [**Installation**](#installation)
* [**UNIX and Linux**](#unix-and-linux) - [**UNIX and Linux**](#unix-and-linux)
* [**macOS**](#macos-homebrew) - [**macOS**](#macos-homebrew)
* [**Windows**](#windows) - [**Windows**](#windows)
* [**Docker**](#docker) - [**Docker**](#docker)
[**System requirements**](#system-requirements) [**System requirements**](#system-requirements)
* [**Dependencies**](#dependencies) - [**Dependencies**](#dependencies)
[**FAQ**](#faq) [**FAQ**](#faq)
[**Contribution**](#contribution) [**Contribution**](#contribution)
* [**Code reviews**](#code-reviews) - [**Code reviews**](#code-reviews)
* [**Some tips for good pull requests**](#some-tips-for-good-pull-requests) - [**Some tips for good pull requests**](#some-tips-for-good-pull-requests)
* [**Formatting**](#formatting) - [**Formatting**](#formatting)
[**Tests**](#tests) [**Tests**](#tests)
[**Licensing**](#licensing) [**Licensing**](#licensing)
[**Contributors**](#contributors) [**Contributors**](#contributors)
* [**Backers**](#backers) - [**Backers**](#backers)
* [**Sponsors**](#sponsors) - [**Sponsors**](#sponsors)
## Screenshots ## Screenshots
![commitsByWeekdayScreenshot](https://github.com/user-attachments/assets/3a55f3ac-8801-4bbf-9b3a-92b53a64631e) ![commitsByWeekdayScreenshot](https://github.com/user-attachments/assets/3496d245-6385-47d1-878a-726e79100eb1)
![commitsByHourScreenshot](https://github.com/user-attachments/assets/d7de5280-8bb9-4391-9c6c-7e688f2df171) ![commitsByHourScreenshot](https://github.com/user-attachments/assets/9f1d69d9-46e0-411d-a5ed-905ffdfb887a)
## Usage ![commitActivityScreenshot](https://github.com/user-attachments/assets/693fff31-65c7-4b9f-a011-6114a2d10a26)
### Interactive ## Usage
`git-quick-stats` has a built-in interactive menu that can be executed as such: ### Interactive
```bash `git-quick-stats` has a built-in interactive menu that can be executed as such:
git-quick-stats
``` ```bash
git-quick-stats
Or ```
```bash Or
git quick-stats
``` ```bash
git quick-stats
### Non-interactive ```
For those who prefer to utilize command-line options, `git-quick-stats` also has a non-interactive mode supporting both short and long options: ### Non-interactive
```bash For those who prefer to utilize command-line options, `git-quick-stats` also has a non-interactive mode supporting both short and long options:
git-quick-stats <optional-command-to-execute-directly>
``` ```bash
git-quick-stats <optional-command-to-execute-directly>
Or ```
```bash Or
git quick-stats <optional-command-to-execute-directly>
``` ```bash
git quick-stats <optional-command-to-execute-directly>
### Command-line arguments ```
Possible arguments in short and long form: ### Command-line arguments
```bash Possible arguments in short and long form:
GENERATE OPTIONS
-T, --detailed-git-stats ```bash
give a detailed list of git stats GENERATE OPTIONS
-R, --git-stats-by-branch -T, --detailed-git-stats
see detailed list of git stats by branch give a detailed list of git stats
-c, --changelogs -R, --git-stats-by-branch
see changelogs see detailed list of git stats by branch
-L, --changelogs-by-author -c, --changelogs
see changelogs by author see changelogs
-S, --my-daily-stats -L, --changelogs-by-author
see your current daily stats see changelogs by author
-V, --csv-output-by-branch -S, --my-daily-stats
output daily stats by branch in CSV format see your current daily stats
-j, --json-output -V, --csv-output-by-branch
save git log as a JSON formatted file to a specified area output daily stats by branch in CSV format
-j, --json-output
LIST OPTIONS save git log as a JSON formatted file to a specified area
-b, --branch-tree
show an ASCII graph of the git repo branch history LIST OPTIONS
-D, --branches-by-date -b, --branch-tree
show branches by date show an ASCII graph of the git repo branch history
-C, --contributors -D, --branches-by-date
see a list of everyone who contributed to the repo show branches by date
-n, --new-contributors -C, --contributors
list everyone who made their first contribution since a specified date see a list of everyone who contributed to the repo
-a, --commits-per-author -n, --new-contributors
displays a list of commits per author list everyone who made their first contribution since a specified date
-d, --commits-per-day -N, --new-contributors-since-tag
displays a list of commits per day list everyone who made their first contribution since a specified git tag
-Y, --commits-by-year -a, --commits-per-author
displays a list of commits per year displays a list of commits per author
-m, --commits-by-month -d, --commits-per-day
displays a list of commits per month displays a list of commits per day
-w, --commits-by-weekday -m, --commits-by-month
displays a list of commits per weekday displays a list of commits per month
-W, --commits-by-author-by-weekday -Y, --commits-by-year
displays a list of commits per weekday by author displays a list of commits per year
-o, --commits-by-hour -w, --commits-by-weekday
displays a list of commits per hour displays a list of commits per weekday
-A, --commits-by-author-by-hour -W, --commits-by-author-by-weekday
displays a list of commits per hour by author displays a list of commits per weekday by author
-z, --commits-by-timezone -o, --commits-by-hour
displays a list of commits per timezone displays a list of commits per hour
-Z, --commits-by-author-by-timezone -A, --commits-by-author-by-hour
displays a list of commits per timezone by author displays a list of commits per hour by author
-z, --commits-by-timezone
SUGGEST OPTIONS displays a list of commits per timezone
-r, --suggest-reviewers -Z, --commits-by-author-by-timezone
show the best people to contact to review code displays a list of commits per timezone by author
-h, -?, --help
display this help text in the terminal CALENDAR OPTIONS
``` -k, --commits-calendar-by-author
shows a calendar heatmap of commits per day-of-week per month for a given author
### Git log since and until -H, --commits-heatmap
shows a heatmap of commits per day-of-week per month for the last 30 days
You can set the variables `_GIT_SINCE` and/or `_GIT_UNTIL` before running `git-quick-stats` to limit the git log. These work similar to git's built-in `--since` and `--until` log options.
SUGGEST OPTIONS
```bash -r, --suggest-reviewers
export _GIT_SINCE="2017-01-20" show the best people to contact to review code
export _GIT_UNTIL="2017-01-22" -h, -?, --help
``` display this help text in the terminal
```
Once set, run `git quick-stats` as normal. Note that this affects all stats that parse the git log history until unset.
### Git log since and until
### Git log limit
You can set the variables `_GIT_SINCE` and/or `_GIT_UNTIL` before running `git-quick-stats` to limit the git log. These work similar to git's built-in `--since` and `--until` log options.
You can set variable `_GIT_LIMIT` for limited output. It will affect the "changelogs" and "branch tree" options. The default limit is `10`.
```bash
```bash export _GIT_SINCE="2017-01-20"
export _GIT_LIMIT=20 export _GIT_UNTIL="2017-01-22"
``` ```
### Git log options Once set, run `git quick-stats` as normal. Note that this affects all stats that parse the git log history until unset.
You can set `_GIT_LOG_OPTIONS` for [git log options](https://git-scm.com/docs/git-log#_options): ### Git log limit
```bash You can set variable `_GIT_LIMIT` for limited output. It will affect the "changelogs" and "branch tree" options. The default limit is `10`.
export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines"
``` ```bash
export _GIT_LIMIT=20
### Git pathspec ```
You can exclude a directory from the stats by using [pathspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec) ### Git tag
```bash You can set `_GIT_TAG` to define the default tag used by the "new contributors since tag" option.
export _GIT_PATHSPEC=':!directory'
``` ```bash
export _GIT_TAG="foo"
You can also exclude files from the stats. Note that it works with any alphanumeric, glob, or regex that git respects. ```
```bash ### Git log options
export _GIT_PATHSPEC=':!package-lock.json'
``` You can set `_GIT_LOG_OPTIONS` for [git log options](https://git-scm.com/docs/git-log#_options):
### Git merge view strategy ```bash
export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines"
You can set the variable `_GIT_MERGE_VIEW` to enable merge commits to be part of the stats by setting `_GIT_MERGE_VIEW` to `enable`. You can also choose to only show merge commits by setting `_GIT_MERGE_VIEW` to `exclusive`. Default is to not show merge commits. These work similar to git's built-in `--merges` and `--no-merges` log options. ```
```bash ### Git pathspec
export _GIT_MERGE_VIEW="enable"
export _GIT_MERGE_VIEW="exclusive" You can exclude a directory from the stats by using [pathspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec)
```
```bash
### Git branch export _GIT_PATHSPEC=':!directory'
```
You can set the variable `_GIT_BRANCH` to set the branch of the stats. Works with commands `--git-stats-by-branch` and `--csv-output-by-branch`.
You can also exclude files from the stats. Note that it works with any alphanumeric, glob, or regex that git respects.
```bash
export _GIT_BRANCH="master" ```bash
``` export _GIT_PATHSPEC=':!package-lock.json'
```
### Color themes
### Git merge view strategy
You can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy`
You can set the variable `_GIT_MERGE_VIEW` to enable merge commits to be part of the stats by setting `_GIT_MERGE_VIEW` to `enable`. You can also choose to only show merge commits by setting `_GIT_MERGE_VIEW` to `exclusive`. Default is to not show merge commits. These work similar to git's built-in `--merges` and `--no-merges` log options.
```bash
export _MENU_THEME="legacy" ```bash
``` export _GIT_MERGE_VIEW="enable"
export _GIT_MERGE_VIEW="exclusive"
![legacyThemeScreenshot](https://github.com/user-attachments/assets/3b319c1a-827f-47b8-bbfa-b8b59a39deef) ```
## Installation ### Git branch
### Debian and Ubuntu You can set the variable `_GIT_BRANCH` to set the branch of the stats. Works with commands `--git-stats-by-branch` and `--csv-output-by-branch`.
If you are on at least Debian Bullseye or Ubuntu Focal you can use apt for installation: ```bash
export _GIT_BRANCH="master"
```bash ```
apt install git-quick-stats
``` ### Ignore authors
### UNIX and Linux You can set the variable `_GIT_IGNORE_AUTHORS` to filter out specific authors. It will affect the "All contributors", ""Suggested code reviewers" and "New contributors" options.
```bash ```bash
git clone https://github.com/arzzen/git-quick-stats.git && cd git-quick-stats export _GIT_IGNORE_AUTHORS="(author@examle.com|username)"
sudo make install ```
```
### Sorting contribution stats
For uninstalling, open up the cloned directory and run
You can sort contribution stats by field `name`, `commits`, `insertions`, `deletions`, or `lines` (total lines changed) and order (`asc`, `desc`). e.g.: `commits-desc`
```bash
sudo make uninstall ```bash
``` export _GIT_SORT_BY="name-asc"
```
For update/reinstall
### Commit days
```bash
sudo make reinstall You can set \_GIT_DAYS to set the number of days for the heatmap
```
```bash
### macOS (homebrew) export _GIT_DAYS=30
```
macOS requires GNU coreutils to be installed and for the non "g" aliased
versions to be exported to your path. The following is an example of how to ### Color themes
perform this if you are using Homebrew as your package manager.
You can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy`.
```bash You can completely disable the color theme by setting the `_MENU_THEME` variable to `none`.
brew install coreutils
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" ```bash
``` export _MENU_THEME="legacy"
# or
From there, you can install via Homebrew as follows: export _MENU_THEME="none"
```
```bash
brew install git-quick-stats ![legacyThemeScreenshot](https://github.com/user-attachments/assets/3b319c1a-827f-47b8-bbfa-b8b59a39deef)
```
## Installation
Or you can follow the UNIX and Linux instructions if you wish.
### Debian and Ubuntu
If you would like to default to using the GNU coreutils (recommended), then you
can add `export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"` to If you are on at least Debian Bullseye or Ubuntu Focal you can use apt for installation:
your applicable `~/.bash_profile`, `~/.zprofile`, or other relevant profile
based on the shell of your choice. ```bash
apt install git-quick-stats
### Windows ```
If you are installing with Cygwin, use these scripts: ### UNIX and Linux
* [installer](https://gist.github.com/arzzen/35e09866dfdadf2108b2420045739245) ```bash
* [uninstaller](https://gist.github.com/arzzen/21c660014d0663b6c5710014714779d6) git clone https://github.com/git-quick-stats/git-quick-stats.git && cd git-quick-stats
sudo make install
If you are wishing to use this with WSL, follow the UNIX and Linux instructions. ```
### Docker For uninstalling, open up the cloned directory and run
You can use the Docker image provided: ```bash
sudo make uninstall
* Build: `docker build -t arzzen/git-quick-stats .` ```
* Run interactive menu: `docker run --rm -it -v $(pwd):/git arzzen/git-quick-stats`
* Docker pull command: `docker pull arzzen/git-quick-stats` [docker repository](https://hub.docker.com/r/arzzen/git-quick-stats) For update/reinstall
## System requirements ```bash
sudo make reinstall
* An OS with a Bash shell ```
* Tools we use:
### macOS (homebrew)
```bash
awk `git-quick-stats` requires GNU `date`. On macOS, install GNU coreutils:
basename
cat ```bash
column brew install coreutils
date export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
echo ```
git
grep The script auto-detects GNU date as either `date` or `gdate`, so exporting
head `gnubin` is optional for this project.
printf
seq From there, you can install via Homebrew as follows:
sort
tput ```bash
tr brew install git-quick-stats
uniq ```
```
Or you can follow the UNIX and Linux instructions if you wish.
### Dependencies
If you would like to default to using GNU coreutils system-wide, add
* [`bsdextrautils`](https://packages.debian.org/sid/bsdextrautils) `apt install bsdextrautils` `export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"` to your
* [`coreutils`](https://packages.debian.org/sid/coreutils) `apt install coreutils` applicable `~/.bash_profile`, `~/.zprofile`, or other relevant profile based
* [`gawk`](https://packages.debian.org/sid/gawk) `apt install gawk` on the shell of your choice.
* [`grep`](https://packages.debian.org/sid/grep) `apt install grep`
* [`ncurses-bin`](https://packages.debian.org/sid/ncurses-bin) `apt install ncurses-bin` ### FreeBSD
## FAQ `git-quick-stats` requires GNU `date`. On FreeBSD, install GNU coreutils:
*Q:* I get some errors after run git-quick-stats in cygwin like `/usr/local/bin/git-quick-stats: line 2: $'\r': command not found` ```bash
pkg install coreutils
*A:* You can run the dos2unix app in cygwin as follows: `/bin/dos2unix.exe /usr/local/bin/git-quick-stats`. This will convert the script from the CR-LF convention that Microsoft uses to the LF convention that UNIX, OS X, and Linux use. You should then should be able to run it as normal. ```
*Q:* How they could be used in a project with many git projects and statistics would show a summary of all git projects? FreeBSD provides GNU date as `gdate`, and the script auto-detects it.
*A:* If you want to include submodule logs, you can try using the following: `export _GIT_LOG_OPTIONS="-p --submodule=log"` ### Windows
(more info about [git log --submodule](https://git-scm.com/docs/git-log#Documentation/git-log.txt---submoduleltformatgt))
If you are installing with Cygwin, use these scripts:
## Contribution
- [installer](https://gist.github.com/arzzen/35e09866dfdadf2108b2420045739245)
Want to contribute? Great! First, read this page. - [uninstaller](https://gist.github.com/arzzen/21c660014d0663b6c5710014714779d6)
### Code reviews If you are wishing to use this with WSL, follow the UNIX and Linux instructions.
All submissions, including submissions by project members, require review.</br> ### Docker
We use GitHub pull requests for this purpose.
You can use the Docker image provided:
### Some tips for good pull requests
- Build: `docker build -t arzzen/git-quick-stats .`
* Use our code </br> - Run interactive menu: `docker run --rm -it -v $(pwd):/git arzzen/git-quick-stats`
When in doubt, try to stay true to the existing code of the project. - Docker pull command: `docker pull arzzen/git-quick-stats` [docker repository](https://hub.docker.com/r/arzzen/git-quick-stats)
* Write a descriptive commit message. What problem are you solving and what
are the consequences? Where and what did you test? Some good tips: ## System requirements
[here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)
and [here](https://www.kernel.org/doc/Documentation/SubmittingPatches). - An OS with a Bash shell
* If your PR consists of multiple commits which are successive improvements / - GNU `date` available as either `date` or `gdate`
fixes to your first commit, consider squashing them into a single commit - Tools we use:
(`git rebase -i`) such that your PR is a single commit on top of the current
HEAD. This make reviewing the code so much easier, and our history more ```bash
readable. awk
basename
### Formatting cat
column
This documentation is written using standard [markdown syntax](https://help.github.com/articles/markdown-basics/). Please submit your changes using the same syntax. date
echo
## Tests git
grep
[![codecov](https://codecov.io/gh/arzzen/git-quick-stats/branch/master/graph/badge.svg)](https://codecov.io/gh/arzzen/git-quick-stats) head
printf
```bash seq
make test sort
``` tput
tr
## Licensing uniq
```
MIT see [LICENSE][] for the full license text.
### Dependencies
[read this page]: http://github.com/arzzen/git-quick-stats/blob/master/.github/CONTRIBUTING.md
[landing page]: http://arzzen.github.io/git-quick-stats - [`bsdextrautils`](https://packages.debian.org/sid/bsdextrautils) `apt install bsdextrautils`
[LICENSE]: https://github.com/arzzen/git-quick-stats/blob/master/LICENSE - [`coreutils`](https://packages.debian.org/sid/coreutils) `apt install coreutils`
- [`gawk`](https://packages.debian.org/sid/gawk) `apt install gawk`
## Contributors - [`grep`](https://packages.debian.org/sid/grep) `apt install grep`
- [`ncurses-bin`](https://packages.debian.org/sid/ncurses-bin) `apt install ncurses-bin`
This project exists thanks to all the people who contribute.
## FAQ
[![contributors](https://opencollective.com/git-quick-stats/contributors.svg?width=890&button=false)](https://github.com/arzzen/git-quick-stats/graphs/contributors)
_Q:_ I get some errors after run git-quick-stats in cygwin like `/usr/local/bin/git-quick-stats: line 2: $'\r': command not found`
### Backers
_A:_ You can run the dos2unix app in cygwin as follows: `/bin/dos2unix.exe /usr/local/bin/git-quick-stats`. This will convert the script from the CR-LF convention that Microsoft uses to the LF convention that UNIX, OS X, and Linux use. You should then should be able to run it as normal.
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/git-quick-stats#backer)]
_Q:_ How they could be used in a project with many git projects and statistics would show a summary of all git projects?
[![backers](https://opencollective.com/git-quick-stats/backers.svg?width=890)](https://opencollective.com/git-quick-stats#backers)
_A:_ If you want to include submodule logs, you can try using the following: `export _GIT_LOG_OPTIONS="-p --submodule=log"`
### Sponsors (more info about [git log --submodule](https://git-scm.com/docs/git-log#Documentation/git-log.txt---submoduleltformatgt))
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/git-quick-stats#sponsor)] ## Contribution
[![sponsor0](https://opencollective.com/git-quick-stats/sponsor/0/avatar.svg?v=1)](https://opencollective.com/git-quick-stats/sponsor/0/website) Want to contribute? Great! First, read this page.
[![sponsor1](https://opencollective.com/git-quick-stats/sponsor/1/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/1/website)
[![sponsor2](https://opencollective.com/git-quick-stats/sponsor/2/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/2/website) ### Code reviews
[![sponsor3](https://opencollective.com/git-quick-stats/sponsor/3/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/3/website)
[![sponsor4](https://opencollective.com/git-quick-stats/sponsor/4/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/4/website) All submissions, including submissions by project members, require review.</br>
[![sponsor5](https://opencollective.com/git-quick-stats/sponsor/5/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/5/website) We use GitHub pull requests for this purpose.
[![sponsor6](https://opencollective.com/git-quick-stats/sponsor/6/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/6/website)
[![sponsor7](https://opencollective.com/git-quick-stats/sponsor/7/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/7/website) ### Some tips for good pull requests
[![sponsor8](https://opencollective.com/git-quick-stats/sponsor/8/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/8/website)
[![sponsor9](https://opencollective.com/git-quick-stats/sponsor/9/avatar.svg)](https://opencollective.com/git-quick-stats/sponsor/9/website) - Use our code </br>
When in doubt, try to stay true to the existing code of the project.
- Write a descriptive commit message. What problem are you solving and what
are the consequences? Where and what did you test? Some good tips:
[here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)
and [here](https://www.kernel.org/doc/Documentation/SubmittingPatches).
- If your PR consists of multiple commits which are successive improvements /
fixes to your first commit, consider squashing them into a single commit
(`git rebase -i`) such that your PR is a single commit on top of the current
HEAD. This make reviewing the code so much easier, and our history more
readable.
### Formatting
This documentation is written using standard [markdown syntax](https://help.github.com/articles/markdown-basics/). Please submit your changes using the same syntax.
## Tests
[![codecov](https://codecov.io/gh/arzzen/git-quick-stats/branch/master/graph/badge.svg)](https://codecov.io/gh/arzzen/git-quick-stats)
```bash
make test
```
## Licensing
MIT see [LICENSE][] for the full license text.
[read this page]: http://github.com/git-quick-stats/git-quick-stats/blob/master/.github/CONTRIBUTING.md
[landing page]: https://git-quick-stats.sh
[LICENSE]: https://github.com/git-quick-stats/git-quick-stats/blob/master/LICENSE
## Contributors
This project exists thanks to all the people who contribute.
[![contributors](https://opencollective.com/git-quick-stats/contributors.svg?width=890&button=false)](https://github.com/git-quick-stats/git-quick-stats/graphs/contributors)

File diff suppressed because it is too large Load diff

View file

@ -1,171 +1,233 @@
.TH git-quick-stats "1" "April 2024" "git-quick-stats" "User Commands" .TH git-quick-stats "1" "June 2025" "git-quick-stats" "User Commands"
.SH NAME .SH NAME
.B git\-quick\-stats .B git\-quick\-stats
\- Simple and efficient way to access various stats in a git repository. \- Simple and efficient way to access various stats in a git repository.
.SH SYNOPSIS .SH SYNOPSIS
.PP .PP
For non\-interactive mode: For non\-interactive mode:
.B git\-quick\-stats [OPTIONS] .B git\-quick\-stats [OPTIONS]
.PP .PP
For interactive mode: For interactive mode:
.B git-quick-stats .B git-quick-stats
.PP .PP
.SH DESCRIPTION .SH DESCRIPTION
.PP .PP
Any git repository contains tons of information about commits, contributors, Any git repository contains tons of information about commits, contributors,
and files. Extracting this information is not always trivial, mostly because and files. Extracting this information is not always trivial, mostly because
of a gadzillion options to a gadzillion git commands. of a gadzillion options to a gadzillion git commands.
This program allows you to see detailed information about a git repository. This program allows you to see detailed information about a git repository.
.PP .PP
.SH GENERATE OPTIONS .SH PLATFORM NOTES
.PP .PP
\fB\-T\fR, \fB\-\-detailed\-git\-stats\fR git-quick-stats requires GNU date support for date parsing options.
.IP .PP
give a detailed list of git stats On macOS, install GNU coreutils with:
.HP .PP
.PP .B brew install coreutils
\fB\-R\fR, \fB\-\-git\-stats\-by\-branch\fR .PP
.IP On FreeBSD, install GNU coreutils with:
see detailed list of git stats by branch .PP
.HP .B pkg install coreutils
.PP .PP
\fB\-c\fR, \fB\-\-changelogs\fR GNU date may be available as either
.IP .B date
see changelogs or
.HP .B gdate
.PP and git-quick-stats auto-detects both.
\fB\-L\fR, \fB\-\-changelogs\-by\-author\fR .PP
.IP .SH GENERATE OPTIONS
see changelogs by author .PP
.HP \fB\-h\fR, \-?, \fB\-\-help\fR
.PP .IP
\fB\-S\fR, \fB\-\-my\-daily\-stats\fR display this help text in the terminal
.IP .PP
see your current daily stats \fB\-T\fR, \fB\-\-detailed\-git\-stats\fR
.HP .IP
.PP give a detailed list of git stats
\fB\-V\fR, \fB\-\-csv\-output\-by\-branch\fR .HP
.IP .PP
output daily stats by branch in CSV format \fB\-R\fR, \fB\-\-git\-stats\-by\-branch\fR
.HP .IP
.PP see detailed list of git stats by branch
\fB\-j\fR, \fB\-\-json\-output\fR .HP
.IP .PP
save git log as a JSON formatted file to a specified area \fB\-c\fR, \fB\-\-changelogs\fR
.HP .IP
.SH LIST OPTIONS see changelogs
.PP .HP
\fB\-b\fR, \fB\-\-branch\-tree\fR .PP
.IP \fB\-L\fR, \fB\-\-changelogs\-by\-author\fR
show an ASCII graph of the git repo branch history .IP
.HP see changelogs by author
.PP .HP
\fB\-D\fR, \fB\-\-branches\-by\-date\fR .PP
.IP \fB\-S\fR, \fB\-\-my\-daily\-stats\fR
show branches by date .IP
.HP see your current daily stats
.PP .HP
\fB\-C\fR, \fB\-\-contributors\fR .PP
.IP \fB\-V\fR, \fB\-\-csv\-output\-by\-branch\fR
see a list of everyone who contributed to the repo .IP
.HP output daily stats by branch in CSV format
.PP .HP
\fB\-n\fR, \fB\-\-new\-contributors\fR .PP
.IP \fB\-j\fR, \fB\-\-json\-output\fR
list everyone who made their first contribution since a specified date .IP
.HP save git log as a JSON formatted file to a specified area
.PP .HP
\fB\-a\fR, \fB\-\-commits\-per\-author\fR .SH LIST OPTIONS
.IP .PP
displays a list of commits per author \fB\-b\fR, \fB\-\-branch\-tree\fR
.HP .IP
.PP show an ASCII graph of the git repo branch history
\fB\-d\fR, \fB\-\-commits\-per\-day\fR .HP
.IP .PP
displays a list of commits per day \fB\-D\fR, \fB\-\-branches\-by\-date\fR
.HP .IP
.PP show branches by date
\fB\-m\fR, \fB\-\-commits\-by\-month\fR .HP
.IP .PP
displays a list of commits per month \fB\-C\fR, \fB\-\-contributors\fR
.HP .IP
.PP see a list of everyone who contributed to the repo
\fB\-Y\fR, \fB\-\-commits\-by\-year\fR .HP
.IP .PP
displays a list of commits per year \fB\-n\fR, \fB\-\-new\-contributors\fR
.HP .IP
.PP list everyone who made their first contribution since a specified date
\fB\-w\fR, \fB\-\-commits\-by\-weekday\fR .HP
.IP .PP
displays a list of commits per weekday \fB\-N\fR, \fB\-\-new\-contributors\-since\-tag\fR
.HP .IP
.PP list everyone who made their first contribution since a specified git tag
\fB\-W\fR, \fB\-\-commits\-by\-author\-by\-weekday\fR .HP
.IP .PP
displays a list of commits per weekday by author \fB\-a\fR, \fB\-\-commits\-per\-author\fR
.HP .IP
.PP displays a list of commits per author
\fB\-o\fR, \fB\-\-commits\-by\-hour\fR .HP
.IP .PP
displays a list of commits per hour \fB\-d\fR, \fB\-\-commits\-per\-day\fR
.HP .IP
.PP displays a list of commits per day
\fB\-A\fR, \fB\-\-commits\-by\-author\-by\-hour\fR .HP
.IP .PP
displays a list of commits per hour by author \fB\-m\fR, \fB\-\-commits\-by\-month\fR
.HP .IP
.PP displays a list of commits per month
\fB\-z\fR, \fB\-\-commits\-by\-timezone\fR .HP
.IP .PP
displays a list of commits per timezone \fB\-Y\fR, \fB\-\-commits\-by\-year\fR
.HP .IP
.PP displays a list of commits per year
\fB\-Z\fR, \fB\-\-commits\-by\-author\-by\-timezone\fR .HP
.IP .PP
displays a list of commits per timezone by author \fB\-w\fR, \fB\-\-commits\-by\-weekday\fR
.HP .IP
.SH SUGGEST OPTIONS displays a list of commits per weekday
.PP .HP
\fB\-r\fR, \fB\-\-suggest\-reviewers\fR .PP
.IP \fB\-W\fR, \fB\-\-commits\-by\-author\-by\-weekday\fR
show the best people to contact to review code .IP
.HP displays a list of commits per weekday by author
.PP .HP
\fB\-h\fR, \-?, \fB\-\-help\fR .PP
.IP \fB\-o\fR, \fB\-\-commits\-by\-hour\fR
display this help text in the terminal .IP
.PP displays a list of commits per hour
.SH ADDITIONAL USAGE .HP
You can set _GIT_SINCE and _GIT_UNTIL to limit the git time log, example: .PP
.PP \fB\-A\fR, \fB\-\-commits\-by\-author\-by\-hour\fR
.B export _GIT_SINCE="2017\-01\-20" .IP
.PP displays a list of commits per hour by author
You can set _GIT_LIMIT for limited output log, example: .HP
.PP .PP
.B export _GIT_LIMIT=20 \fB\-z\fR, \fB\-\-commits\-by\-timezone\fR
.PP .IP
You can set _GIT_LOG_OPTIONS for git log options, example: displays a list of commits per timezone
.PP .HP
.B export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines" .PP
.PP \fB\-Z\fR, \fB\-\-commits\-by\-author\-by\-timezone\fR
You can exclude directories or files from the stats by using pathspec, example: .IP
.PP displays a list of commits per timezone by author
.B export _GIT_PATHSPEC=':!pattern' .HP
.PP .PP
You can set _GIT_MERGE_VIEW to show merge commits with normal commits, example: \fB\-\-activity\-calendar\fR
.PP .IP
.B export _GIT_MERGE_VIEW="enable" displays a calendar-style grid of commit activity per day-of-week and month for a selected author.
.PP .HP
You can also set _GIT_MERGE_VIEW to only show merge commits, example: .SH SUGGEST OPTIONS
.PP .PP
.B export _GIT_MERGE_VIEW="exclusive" \fB\-r\fR, \fB\-\-suggest\-reviewers\fR
.PP .IP
You can switch to the legacy color scheme, example: show the best people to contact to review code
.PP .HP
.B export _MENU_THEME=legacy .PP
.PP .SH CALENDAR OPTIONS
You can set _GIT_BRANCH to set the branch of the stats, example: .PP
.PP \fB\-k\fR, \fB\-\-commits\-calendar\-by\-author\fR outputs a visual grid of commit activity for a selected author, grouped by day-of-week (rows: Mon..Sun) and month (columns: Jan..Dec). Each cell is 3 characters wide, separated by one space.
.B export _GIT_BRANCH="master" .PP
. .PP
.fi \fB\-H\fR, \fB\-\-commits\-heatmap\fR shows a heatmap of commits per day per hour for the last 30 days
.PP
.SH ADDITIONAL USAGE
You can set _GIT_SINCE and _GIT_UNTIL to limit the git time log, example:
.PP
.B export _GIT_SINCE="2017\-01\-20"
.PP
You can set _GIT_LIMIT for limited output log, example:
.PP
.B export _GIT_LIMIT=20
.PP
You can set _GIT_TAG to define the default tag used by the "new contributors since tag" option, example:
.PP
.B export _GIT_TAG="foo"
.PP
You can set _GIT_LOG_OPTIONS for git log options, example:
.PP
.B export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines"
.PP
You can exclude directories or files from the stats by using pathspec, example:
.PP
.B export _GIT_PATHSPEC=':!pattern'
.PP
You can set _GIT_MERGE_VIEW to show merge commits with normal commits, example:
.PP
.B export _GIT_MERGE_VIEW="enable"
.PP
You can also set _GIT_MERGE_VIEW to only show merge commits, example:
.PP
.B export _GIT_MERGE_VIEW="exclusive"
.PP
You can sort contribution stats by field "name", "commits", "insertions", "deletions", or "lines" (total lines changed) and order ("asc", "desc"). e.g.: "commits-desc"
.PP
.B export _GIT_SORT_BY="name-asc"
.PP
You can change to the legacy color scheme by toggling the variable "_MENU_THEME" between "default" and "legacy". You can completely disable the color theme by setting the "_MENU_THEME" variable to "none", example:
.PP
.B export _MENU_THEME=legacy
.PP
or
.B export _MENU_THEME=none
.PP
You can set _GIT_BRANCH to set the branch of the stats, example:
.PP
.B export _GIT_BRANCH="master"
.PP
You can set _GIT_IGNORE_AUTHORS to filter out specific authors, example:
.PP
.B export _GIT_IGNORE_AUTHORS="(author@examle.com|username)"
.PP
You can set _GIT_DAYS to set the number of days for the heatmap, example:
.PP
.B export _GIT_DAYS=30"
.
.fi
.PP
.SH SEE ALSO
.BR git (1)
.PP
Project homepage:
.UR https://github.com/git-quick-stats/git-quick-stats
.UE

View file

@ -11,7 +11,7 @@
. tests/assert.sh -v . tests/assert.sh -v
src="./git-quick-stats" src="./git-quick-stats"
assert "$src fail" "Invalid argument assert "$src fail" "Invalid argument: fail
NAME NAME
git-quick-stats - Simple and efficient way to access various stats in a git repo git-quick-stats - Simple and efficient way to access various stats in a git repo
@ -24,7 +24,7 @@ DESCRIPTION
Any git repository contains tons of information about commits, contributors, Any git repository contains tons of information about commits, contributors,
and files. Extracting this information is not always trivial, mostly because and files. Extracting this information is not always trivial, mostly because
of a gadzillion options to a gadzillion git commands. of a gadzillion options to a gadzillion git commands.
This program allows you to see detailed information about a git repository. This program allows you to see detailed information about a git repository.
GENERATE OPTIONS GENERATE OPTIONS
@ -52,6 +52,8 @@ LIST OPTIONS
see a list of everyone who contributed to the repo see a list of everyone who contributed to the repo
-n, --new-contributors -n, --new-contributors
list everyone who made their first contribution since a specified date list everyone who made their first contribution since a specified date
-N, --new-contributors-since-tag
list everyone who made their first contribution since a specified tag
-a, --commits-per-author -a, --commits-per-author
displays a list of commits per author displays a list of commits per author
-d, --commits-per-day -d, --commits-per-day
@ -73,6 +75,12 @@ LIST OPTIONS
-Z, --commits-by-author-by-timezone -Z, --commits-by-author-by-timezone
displays a list of commits per timezone by author displays a list of commits per timezone by author
CALENDAR OPTIONS
-k, --commits-calendar-by-author
shows a calendar heatmap of commits per day-of-week per month for a given author
-H, --commits-heatmap
shows a heatmap of commits per day-of-week per month for the last 30 days
SUGGEST OPTIONS SUGGEST OPTIONS
-r, --suggest-reviewers -r, --suggest-reviewers
show the best people to contact to review code show the best people to contact to review code
@ -92,22 +100,34 @@ ADDITIONAL USAGE
ex: export _GIT_MERGE_VIEW=enable ex: export _GIT_MERGE_VIEW=enable
You can also set _GIT_MERGE_VIEW to only show merge commits You can also set _GIT_MERGE_VIEW to only show merge commits
ex: export _GIT_MERGE_VIEW=exclusive ex: export _GIT_MERGE_VIEW=exclusive
You can set _MENU_THEME to display the legacy color scheme You can change to the legacy color scheme by toggling the variable \"_MENU_THEME\" between \"default\" and \"legacy\".
You can completely disable the color theme by setting the \"_MENU_THEME\" variable to \"none\".
ex: export _MENU_THEME=legacy ex: export _MENU_THEME=legacy
You can set _GIT_BRANCH to set the branch of the stats You can set _GIT_BRANCH to set the branch of the stats
ex: export _GIT_BRANCH=master" ex: export _GIT_BRANCH=master
You can set _GIT_IGNORE_AUTHORS to filter out specific authors
ex: export _GIT_IGNORE_AUTHORS=\"(author1|author2)\"
You can sort contribution stats by field \"name\", \"commits\", \"insertions\", \"deletions\", or \"lines\" - total lines changed and order - \"asc\", \"desc\"
ex: export _GIT_SORT_BY=\"name-asc\"
You can set _GIT_DAYS to set the number of days for the heatmap
ex: export _GIT_DAYS=30"
assert_raises "$src fail" 1 assert_raises "$src fail" 1
assert_contains "$src --suggest-reviewers" "Suggested code reviewers (based on git history)" assert_contains "$src --suggest-reviewers" "Suggested code reviewers (based on git history)"
assert_success "$src --suggest-reviewers" assert_success "$src --suggest-reviewers"
assert_contains "$src --detailed-git-stats" "Contribution stats" assert_contains "$src --detailed-git-stats" "Contribution stats (by author) on the current branch"
assert_success "$src --detailed-git-stats" assert_success "$src --detailed-git-stats"
assert_contains "$src --commits-per-day" "Git commits per date" assert_contains "$src --commits-per-day" "Git commits per date"
assert_success "$src --commits-per-day" assert_success "$src --commits-per-day"
assert_contains "$src --my-daily-stats" "My daily status"
assert_contains "$src --my-daily-stats" "most changed files today"
assert_contains "$src --my-daily-stats" "most active users today (excluding you)"
assert_success "$src --my-daily-stats"
assert_startswith "$src --commits-by-year" "Git commits by year" assert_startswith "$src --commits-by-year" "Git commits by year"
assert_success "$src --commits-by-year" assert_success "$src --commits-by-year"