diff --git a/README.md b/README.md new file mode 100644 index 0000000..5458e03 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# git-chart + +`gitchart` is a command line tool to show git commits distribution in the last several months. + +![](./example.png) + + + +## Install + +```shell +go get github.com/chenlujjj/gitchart +``` + +## Usage + +``` +$ gitchart -h + +Usage of gitchart: + -month int + since how many months ago (default 6) + -self + only count commits by myself. This flag would override 'username' flag + -username string + count commits by the 'username' author. If not set, would count all authors' commits +``` diff --git a/example.png b/example.png new file mode 100644 index 0000000..0a015f2 Binary files /dev/null and b/example.png differ diff --git a/main.go b/main.go index 44edec5..578a973 100644 --- a/main.go +++ b/main.go @@ -17,8 +17,8 @@ const cellWidth = 3 // 每个格子的宽度 func main() { months := flag.Int("month", 6, "since how many months ago") - username := flag.String("username", "", "check commits by the author. If not set, would check all authors' commits") - self := flag.Bool("self", false, "only check commits by myself. This flag would override `username` flag") + username := flag.String("username", "", "count commits by the 'username' author. If not set, would count all authors' commits") + self := flag.Bool("self", false, "only count commits by myself. This flag would override 'username' flag") flag.Parse() repo, err := os.Getwd()