Skip to content

bash script to generate git summary for any work folder that contain multiple repos

Notifications You must be signed in to change notification settings

jackytsheng/git-summary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Lightweight Git Summary Script

This bash script can generate simple git reports for all git repositories

# Report Example
---------------some-small-project
     6  jackytsheng <[email protected]>
     6  commits, 13  files changed, 307  insertions(+), 1  deletions(-)

---------------some-frontend-project
   177  jackytsheng <[email protected]>
    54  Author A <[email protected]>
    53  jackytsheng <[email protected]>
    35  Author B <[email protected]>
     9  unknown <[email protected]>
    17  Frank Yang <[email protected]>
   345  commits, 1937  files changed, 52137  insertions(+), 13493  deletions(-)

How to use it ?

  1. Clone this project repo or simply download the git-summary.sh
  2. Move the script to the same directory level that consists all other repositories
# projects/

├── some-small-project (1st repo)
│   ├── README.md
│   └── src
├── some-frontend-project (2nd repo)
│   ├── README.md
│   └── src
└── git-summary.sh

Report Limiting

You can provide optional flags to tailor the report. At the moment it supports specific git message for time frame and/or for specific author. If not specified, report will be printed out for all authors

# -s: since
./git-summary.sh -s "10 Jan 2022"


# Output
flag --since 01 Dec 2020 specified
---------------some-small-project
    31  jackytsheng <[email protected]>
     1  jackytsheng <[email protected]>
    32  commits, 140  files changed, 5196  insertions(+), 1330  deletions(-)

---------------some-frontend
     0  commits, 0  files changed, 0  insertions(+), 0  deletions(-)
# -b: before
./git-summary.sh -s "10 Dec 2021" -b "10 Jan 2022"


# Output
flag --since 01 Dec 2020 specified
---------------some-small-project
     0  commits, 0  files changed, 0  insertions(+), 0  deletions(-)

---------------some-frontend
   131  jackytsheng <[email protected]>
    37  jackytsheng <[email protected]>
    34   Frank Yang <[email protected]>
    31   unknown <[email protected]>
     2   Author B <[email protected]>
     1   jackytsheng <[email protected]>
     1   Author A <[email protected]>
   237  commits, 1310  files changed, 17009  insertions(+), 9997  deletions(-)
# -a: author
./git-summary.sh -s "10 Dec 2021" -b "10 Dec 2022" -a Jacky


# Output
flag --since 01 Dec 2020 specified
---------------some-small-project
     0  commits, 0  files changed, 0  insertions(+), 0  deletions(-)

---------------some-frontend
   131  jackytsheng <[email protected]>
    37  jackytsheng <[email protected]>
   168  commits, 1143  files changed, 13515  insertions(+), 8879  deletions(-)

Optional Flags Table

Under the hood, it uses git log to generate the report, so optional flag provided will be converted to flags that limit git log. See Commit Limiting for more detail

optional flags git log flags equivalent
-s --since
-b --before
-a --author

Footnote

If you find this useful please give a ⭐️. Much appreciate. Welcome any feedback or suggestion

About

bash script to generate git summary for any work folder that contain multiple repos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages