Skip to content

Commit

Permalink
refine help doc and add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlujjj committed Aug 29, 2021
1 parent 14a5a3a commit 9627960
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9627960

Please sign in to comment.