Skip to content

michaelmonetized/ascii-commit-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Show a graph of your commits V1.0.2

This is a command line tool to show a graph of your commits as ascii art. ascii-commit-graph-screenshot

To Do

  • Merge with rc
  • Create a release

Dependencies

  • gh optional for showing issues with --show-issues
  • rg optional for showing todos with --show-todos

Installation

1 clone into ~/bin/

git clone https://github.com/michael-k/ascii-commit-graph.git ~/bin/ascii-commit-graph

2 add write permissions

chmod +x ~/bin/ascii-commit-graph/ascii-commit-graph.sh

3 create a symlink to /usr/local/bin/

sudo ln -s ~/bin/ascii-commit-graph/ascii-commit-graph.sh /usr/local/bin/ascii-commit-graph

Usage

Show all commits for the last 52 weeks

ascii-commit-graph

ascii-commit-graph-example

Show only columns for the current year

ascii-commit-graph --this-year

Show commit history full-width

[x] maybe make this a rule on the default behavior if tput cols is less than 52

ascii-commit-graph --full-width

Extra

Add to your .bashrc zoxide config

zcd() {
  if [ "$#" -eq 0 ]; then
    z
  else
    z "$@"
  fi

  ascii-commit-graph --full-width --show-issues --show-todos
}

alias cd="zcd"

eval "$(zoxide init zsh)"

Bonus new features for gh users

Author contribution history

when you're not in a git repo you can see the commit history for all the repos you own.

ascii-commit-graph --author

Show issues

ascii-commit-graph --show-issues

runs gh issue list and shows the issues in the current directory.

Show todos (for rg users)

ascii-commit-graph --show-todos

runs rg "(\[\s\]|TODO|BUG|FIXME|ISSUE|HACK|\[\-\])" -g '!*/lib/*' -g '!*/node_modules/*' -g '!*/vendor/*' -NU --color=always and shows the todos found in the current directory's files.

Made with ❤️ by Michael Hurley D/B/A Hustle Launch hustle-launch-animated

About

A bash script to show the commit graph ytd for the current working directory

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages