{"id":17758020,"url":"https://github.com/git-quick-stats/git-quick-stats","last_synced_at":"2025-11-03T17:54:07.477Z","repository":{"id":40518928,"uuid":"79046698","full_name":"git-quick-stats/git-quick-stats","owner":"git-quick-stats","description":"▁▅▆▃▅ Git quick statistics is a simple and efficient way to access various statistics in git repository.","archived":false,"fork":false,"pushed_at":"2025-02-27T16:49:37.000Z","size":377,"stargazers_count":6521,"open_issues_count":12,"forks_count":263,"subscribers_count":56,"default_branch":"master","last_synced_at":"2025-05-08T11:16:39.791Z","etag":null,"topics":["bash","changelog","commits","contributors","detailed","git","git-addons","git-pathspec","gitlog","history","meeting","review","reviewer","shell","shell-script","statistical-analysis","statistics","stats","suggestion","topics"],"latest_commit_sha":null,"homepage":"https://git-quick-stats.sh/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-quick-stats.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":null},"created_at":"2017-01-15T17:11:22.000Z","updated_at":"2025-05-08T05:24:37.000Z","dependencies_parsed_at":"2023-10-05T01:25:47.269Z","dependency_job_id":"37c4d1ec-3ec8-462a-99cc-7527664fb3c2","html_url":"https://github.com/git-quick-stats/git-quick-stats","commit_stats":{"total_commits":213,"total_committers":53,"mean_commits":4.018867924528302,"dds":0.5211267605633803,"last_synced_commit":"32a84903ff59b15cbe2ee934af1ac5f4b2b80e1d"},"previous_names":["git-quick-stats/git-quick-stats"],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-quick-stats%2Fgit-quick-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-quick-stats%2Fgit-quick-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-quick-stats%2Fgit-quick-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-quick-stats%2Fgit-quick-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-quick-stats","download_url":"https://codeload.github.com/git-quick-stats/git-quick-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253418973,"owners_count":21905334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","changelog","commits","contributors","detailed","git","git-addons","git-pathspec","gitlog","history","meeting","review","reviewer","shell","shell-script","statistical-analysis","statistics","stats","suggestion","topics"],"created_at":"2024-10-26T18:01:09.776Z","updated_at":"2025-11-03T17:54:07.472Z","avatar_url":"https://github.com/git-quick-stats.png","language":"Shell","funding_links":[],"categories":["Shell","statistics","bash"],"sub_categories":[],"readme":"# 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\u0026url=https://github.com/arzzen/git-quick-stat\u0026via=arzzen\u0026hashtags=git,stats,tool,statistics,developers)\r\n\r\n[![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/git-quick-stats.svg)](https://formulae.brew.sh/formula/git-quick-stats#default)\r\n\r\n\u003e `git-quick-stats` is a simple and efficient way to access various statistics in a git repository.\r\n\u003e\r\n\u003e 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 :).\r\n\r\n![mainImageScreenshot](https://github.com/user-attachments/assets/7d8637a4-5a67-49f6-8724-ca7548b987c6)\r\n\r\n## Table of Contents\r\n\r\n[**Screenshots**](#screenshots)\r\n\r\n[**Usage**](#usage)\r\n\r\n- [**Interactive**](#interactive)\r\n- [**Non-interactive**](#non-interactive)\r\n- [**Command-line arguments**](#command-line-arguments)\r\n- [**Git log since and until**](#git-log-since-and-until)\r\n- [**Git log limit**](#git-log-limit)\r\n- [**Git log options**](#git-log-options)\r\n- [**Git pathspec**](#git-pathspec)\r\n- [**Git merge view strategy**](#git-merge-view-strategy)\r\n- [**Color themes**](#color-themes)\r\n\r\n[**Installation**](#installation)\r\n\r\n- [**UNIX and Linux**](#unix-and-linux)\r\n- [**macOS**](#macos-homebrew)\r\n- [**Windows**](#windows)\r\n- [**Docker**](#docker)\r\n\r\n[**System requirements**](#system-requirements)\r\n\r\n- [**Dependencies**](#dependencies)\r\n\r\n[**FAQ**](#faq)\r\n\r\n[**Contribution**](#contribution)\r\n\r\n- [**Code reviews**](#code-reviews)\r\n- [**Some tips for good pull requests**](#some-tips-for-good-pull-requests)\r\n- [**Formatting**](#formatting)\r\n\r\n[**Tests**](#tests)\r\n\r\n[**Licensing**](#licensing)\r\n\r\n[**Contributors**](#contributors)\r\n\r\n- [**Backers**](#backers)\r\n- [**Sponsors**](#sponsors)\r\n\r\n## Screenshots\r\n\r\n![commitsByWeekdayScreenshot](https://github.com/user-attachments/assets/3496d245-6385-47d1-878a-726e79100eb1)\r\n\r\n![commitsByHourScreenshot](https://github.com/user-attachments/assets/9f1d69d9-46e0-411d-a5ed-905ffdfb887a)\r\n\r\n![commitActivityScreenshot](https://github.com/user-attachments/assets/693fff31-65c7-4b9f-a011-6114a2d10a26)\r\n\r\n## Usage\r\n\r\n### Interactive\r\n\r\n`git-quick-stats` has a built-in interactive menu that can be executed as such:\r\n\r\n```bash\r\ngit-quick-stats\r\n```\r\n\r\nOr\r\n\r\n```bash\r\ngit quick-stats\r\n```\r\n\r\n### Non-interactive\r\n\r\nFor those who prefer to utilize command-line options, `git-quick-stats` also has a non-interactive mode supporting both short and long options:\r\n\r\n```bash\r\ngit-quick-stats \u003coptional-command-to-execute-directly\u003e\r\n```\r\n\r\nOr\r\n\r\n```bash\r\ngit quick-stats \u003coptional-command-to-execute-directly\u003e\r\n```\r\n\r\n### Command-line arguments\r\n\r\nPossible arguments in short and long form:\r\n\r\n```bash\r\nGENERATE OPTIONS\r\n    -T, --detailed-git-stats\r\n        give a detailed list of git stats\r\n    -R, --git-stats-by-branch\r\n        see detailed list of git stats by branch\r\n    -c, --changelogs\r\n        see changelogs\r\n    -L, --changelogs-by-author\r\n        see changelogs by author\r\n    -S, --my-daily-stats\r\n        see your current daily stats\r\n    -V, --csv-output-by-branch\r\n        output daily stats by branch in CSV format\r\n    -j, --json-output\r\n        save git log as a JSON formatted file to a specified area\r\n\r\nLIST OPTIONS\r\n    -b, --branch-tree\r\n        show an ASCII graph of the git repo branch history\r\n    -D, --branches-by-date\r\n        show branches by date\r\n    -C, --contributors\r\n        see a list of everyone who contributed to the repo\r\n    -n, --new-contributors\r\n        list everyone who made their first contribution since a specified date\r\n    -a, --commits-per-author\r\n        displays a list of commits per author\r\n    -d, --commits-per-day\r\n        displays a list of commits per day\r\n    -m, --commits-by-month\r\n        displays a list of commits per month\r\n    -Y, --commits-by-year\r\n        displays a list of commits per year\r\n    -w, --commits-by-weekday\r\n        displays a list of commits per weekday\r\n    -W, --commits-by-author-by-weekday\r\n        displays a list of commits per weekday by author\r\n    -o, --commits-by-hour\r\n        displays a list of commits per hour\r\n    -A, --commits-by-author-by-hour\r\n        displays a list of commits per hour by author\r\n    -z, --commits-by-timezone\r\n        displays a list of commits per timezone\r\n    -Z, --commits-by-author-by-timezone\r\n        displays a list of commits per timezone by author\r\n\r\nCALENDAR OPTIONS\r\n    -k, --commits-calendar-by-author\r\n        shows a calendar heatmap of commits per day-of-week per month for a given author\r\n    -H, --commits-heatmap\r\n        shows a heatmap of commits per day-of-week per month for the last 30 days\r\n\r\nSUGGEST OPTIONS\r\n    -r, --suggest-reviewers\r\n        show the best people to contact to review code\r\n    -h, -?, --help\r\n        display this help text in the terminal\r\n```\r\n\r\n### Git log since and until\r\n\r\nYou 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.\r\n\r\n```bash\r\nexport _GIT_SINCE=\"2017-01-20\"\r\nexport _GIT_UNTIL=\"2017-01-22\"\r\n```\r\n\r\nOnce set, run `git quick-stats` as normal. Note that this affects all stats that parse the git log history until unset.\r\n\r\n### Git log limit\r\n\r\nYou can set variable `_GIT_LIMIT` for limited output. It will affect the \"changelogs\" and \"branch tree\" options. The default limit is `10`.\r\n\r\n```bash\r\nexport _GIT_LIMIT=20\r\n```\r\n\r\n### Git log options\r\n\r\nYou can set `_GIT_LOG_OPTIONS` for [git log options](https://git-scm.com/docs/git-log#_options):\r\n\r\n```bash\r\nexport _GIT_LOG_OPTIONS=\"--ignore-all-space --ignore-blank-lines\"\r\n```\r\n\r\n### Git pathspec\r\n\r\nYou can exclude a directory from the stats by using [pathspec](https://git-scm.com/docs/gitglossary#gitglossary-aiddefpathspecapathspec)\r\n\r\n```bash\r\nexport _GIT_PATHSPEC=':!directory'\r\n```\r\n\r\nYou can also exclude files from the stats. Note that it works with any alphanumeric, glob, or regex that git respects.\r\n\r\n```bash\r\nexport _GIT_PATHSPEC=':!package-lock.json'\r\n```\r\n\r\n### Git merge view strategy\r\n\r\nYou 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.\r\n\r\n```bash\r\nexport _GIT_MERGE_VIEW=\"enable\"\r\nexport _GIT_MERGE_VIEW=\"exclusive\"\r\n```\r\n\r\n### Git branch\r\n\r\nYou 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`.\r\n\r\n```bash\r\nexport _GIT_BRANCH=\"master\"\r\n```\r\n\r\n### Ignore authors\r\n\r\nYou 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.\r\n\r\n```bash\r\nexport _GIT_IGNORE_AUTHORS=\"(author@examle.com|username)\"\r\n```\r\n\r\n### Sorting contribution stats\r\n\r\nYou can sort contribution stats by field `name`, `commits`, `insertions`, `deletions`, or `lines` (total lines changed) and order (`asc`, `desc`). e.g.: `commits-desc`\r\n\r\n```bash\r\nexport _GIT_SORT_BY=\"name-asc\"\r\n```\r\n\r\n### Commit days\r\n\r\nYou can set \\_GIT_DAYS to set the number of days for the heatmap\r\n\r\n```bash\r\nexport _GIT_DAYS=30\r\n```\r\n\r\n### Color themes\r\n\r\nYou can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy`.\r\nYou can completely disable the color theme by setting the `_MENU_THEME` variable to `none`.\r\n\r\n```bash\r\nexport _MENU_THEME=\"legacy\"\r\n# or\r\nexport _MENU_THEME=\"none\"\r\n```\r\n\r\n![legacyThemeScreenshot](https://github.com/user-attachments/assets/3b319c1a-827f-47b8-bbfa-b8b59a39deef)\r\n\r\n## Installation\r\n\r\n### Debian and Ubuntu\r\n\r\nIf you are on at least Debian Bullseye or Ubuntu Focal you can use apt for installation:\r\n\r\n```bash\r\napt install git-quick-stats\r\n```\r\n\r\n### UNIX and Linux\r\n\r\n```bash\r\ngit clone https://github.com/git-quick-stats/git-quick-stats.git \u0026\u0026 cd git-quick-stats\r\nsudo make install\r\n```\r\n\r\nFor uninstalling, open up the cloned directory and run\r\n\r\n```bash\r\nsudo make uninstall\r\n```\r\n\r\nFor update/reinstall\r\n\r\n```bash\r\nsudo make reinstall\r\n```\r\n\r\n### macOS (homebrew)\r\n\r\nmacOS requires GNU coreutils to be installed and for the non \"g\" aliased\r\nversions to be exported to your path. The following is an example of how to\r\nperform this if you are using Homebrew as your package manager.\r\n\r\n```bash\r\nbrew install coreutils\r\nexport PATH=\"$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH\"\r\n```\r\n\r\nFrom there, you can install via Homebrew as follows:\r\n\r\n```bash\r\nbrew install git-quick-stats\r\n```\r\n\r\nOr you can follow the UNIX and Linux instructions if you wish.\r\n\r\nIf you would like to default to using the GNU coreutils (recommended), then you\r\ncan add `export PATH=\"$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH\"` to\r\nyour applicable `~/.bash_profile`, `~/.zprofile`, or other relevant profile\r\nbased on the shell of your choice.\r\n\r\n### Windows\r\n\r\nIf you are installing with Cygwin, use these scripts:\r\n\r\n- [installer](https://gist.github.com/arzzen/35e09866dfdadf2108b2420045739245)\r\n- [uninstaller](https://gist.github.com/arzzen/21c660014d0663b6c5710014714779d6)\r\n\r\nIf you are wishing to use this with WSL, follow the UNIX and Linux instructions.\r\n\r\n### Docker\r\n\r\nYou can use the Docker image provided:\r\n\r\n- Build: `docker build -t arzzen/git-quick-stats .`\r\n- Run interactive menu: `docker run --rm -it -v $(pwd):/git arzzen/git-quick-stats`\r\n- Docker pull command: `docker pull arzzen/git-quick-stats` [docker repository](https://hub.docker.com/r/arzzen/git-quick-stats)\r\n\r\n## System requirements\r\n\r\n- An OS with a Bash shell\r\n- Tools we use:\r\n\r\n```bash\r\nawk\r\nbasename\r\ncat\r\ncolumn\r\ndate\r\necho\r\ngit\r\ngrep\r\nhead\r\nprintf\r\nseq\r\nsort\r\ntput\r\ntr\r\nuniq\r\n```\r\n\r\n### Dependencies\r\n\r\n- [`bsdextrautils`](https://packages.debian.org/sid/bsdextrautils) `apt install bsdextrautils`\r\n- [`coreutils`](https://packages.debian.org/sid/coreutils) `apt install coreutils`\r\n- [`gawk`](https://packages.debian.org/sid/gawk) `apt install gawk`\r\n- [`grep`](https://packages.debian.org/sid/grep) `apt install grep`\r\n- [`ncurses-bin`](https://packages.debian.org/sid/ncurses-bin) `apt install ncurses-bin`\r\n\r\n## FAQ\r\n\r\n_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`\r\n\r\n_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.\r\n\r\n_Q:_ How they could be used in a project with many git projects and statistics would show a summary of all git projects?\r\n\r\n_A:_ If you want to include submodule logs, you can try using the following: `export _GIT_LOG_OPTIONS=\"-p --submodule=log\"`\r\n(more info about [git log --submodule](https://git-scm.com/docs/git-log#Documentation/git-log.txt---submoduleltformatgt))\r\n\r\n## Contribution\r\n\r\nWant to contribute? Great! First, read this page.\r\n\r\n### Code reviews\r\n\r\nAll submissions, including submissions by project members, require review.\u003c/br\u003e\r\nWe use GitHub pull requests for this purpose.\r\n\r\n### Some tips for good pull requests\r\n\r\n- Use our code \u003c/br\u003e\r\n  When in doubt, try to stay true to the existing code of the project.\r\n- Write a descriptive commit message. What problem are you solving and what\r\n  are the consequences? Where and what did you test? Some good tips:\r\n  [here](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message)\r\n  and [here](https://www.kernel.org/doc/Documentation/SubmittingPatches).\r\n- If your PR consists of multiple commits which are successive improvements /\r\n  fixes to your first commit, consider squashing them into a single commit\r\n  (`git rebase -i`) such that your PR is a single commit on top of the current\r\n  HEAD. This make reviewing the code so much easier, and our history more\r\n  readable.\r\n\r\n### Formatting\r\n\r\nThis documentation is written using standard [markdown syntax](https://help.github.com/articles/markdown-basics/). Please submit your changes using the same syntax.\r\n\r\n## Tests\r\n\r\n[![codecov](https://codecov.io/gh/arzzen/git-quick-stats/branch/master/graph/badge.svg)](https://codecov.io/gh/arzzen/git-quick-stats)\r\n\r\n```bash\r\nmake test\r\n```\r\n\r\n## Licensing\r\n\r\nMIT see [LICENSE][] for the full license text.\r\n\r\n[read this page]: http://github.com/git-quick-stats/git-quick-stats/blob/master/.github/CONTRIBUTING.md\r\n[landing page]: https://git-quick-stats.sh\r\n[LICENSE]: https://github.com/git-quick-stats/git-quick-stats/blob/master/LICENSE\r\n\r\n## Contributors\r\n\r\nThis project exists thanks to all the people who contribute.\r\n\r\n[![contributors](https://opencollective.com/git-quick-stats/contributors.svg?width=890\u0026button=false)](https://github.com/git-quick-stats/git-quick-stats/graphs/contributors)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-quick-stats%2Fgit-quick-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-quick-stats%2Fgit-quick-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-quick-stats%2Fgit-quick-stats/lists"}