Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaossa/git-activity
Display an activity graph (like the contribution graph on GitHub) for the current git repository and branch
https://github.com/aaossa/git-activity
bash-script git
Last synced: 8 days ago
JSON representation
Display an activity graph (like the contribution graph on GitHub) for the current git repository and branch
- Host: GitHub
- URL: https://github.com/aaossa/git-activity
- Owner: aaossa
- License: mit
- Created: 2022-05-12T02:12:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-30T14:39:08.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:15:54.852Z (4 months ago)
- Topics: bash-script, git
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 148
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - aaossa/git-activity - Display an activity graph (like the contribution graph on GitHub) for the current git repository and branch (Shell)
README
# git-activity
A custom git command to display an activity graph (like the contribution graph on GitHub) for the current git repository and branch. To add this custom git command to git, just place the file in a folder that's in your path (a.k.a `PATH`). You can [setup `git-activity` as custom command](https://github.com/aaossa/git-activity/wiki/Setup-'git-activity'-as-custom-command).
### Usage
```bash
# Display activity for this branch
$ git activity -h
Usage: git-activity [-h] [-n] [-s style]Display an activity graph (like the contribution graph on GitHub) for the
current git repository and branchAvailable options:
-h, --help Print this help and exit
-n, --no-space Remove spaces between week columns
-s, --style Sets style of the graph: square (default), block, or plus
```The output of the command displays a colored graph similar to the one that you can find in any GitHub profile webpage:
```bash
# And... a sample output (of course, does not contain colors)
$ git activity
Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Mon ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Wed ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Fri ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■Less ■ ■ ■ ■ ■ More
```![image](https://user-images.githubusercontent.com/10425834/170083409-9ac54a18-8de5-4a7d-8338-375d285e5547.png)
There are also a couple of different styles available (square, block, and plus), and spacing between columns can be disabled:
```bash
# Another example to highlay some of the available options
$ git activity --no-space --style block
Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May
█████████████████████████████████████████████████████
Mon █████████████████████████████████████████████████████
█████████████████████████████████████████████████████
Wed ████████████████████████████████████████████████████
████████████████████████████████████████████████████
Fri ████████████████████████████████████████████████████
████████████████████████████████████████████████████Less █ █ █ █ █ More
```![image](https://user-images.githubusercontent.com/10425834/170083883-6145a11f-b6d8-490e-a751-45c2d6552698.png)
### Run On Mac
You need to install `coreutils`. If you have brew available, you can execute the command `brew install coreutils`.
### License
This software is released under the [MIT License](https://opensource.org/licenses/MIT)