commit 3a76f918b3674acbc6981152c6b373c56561a330
parent d405cbfe824bb7fc5eae0b7e5c7d6dc3094d3a15
Author: Mirko Ledda <mko.ledda@gmail.com>
Date: Sat, 6 Jan 2018 23:17:40 -0800
parent d405cbfe824bb7fc5eae0b7e5c7d6dc3094d3a15
Author: Mirko Ledda <mko.ledda@gmail.com>
Date: Sat, 6 Jan 2018 23:17:40 -0800
new README + added .gitignore
3 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md @@ -1,21 +1,32 @@ # git-summary -Checks what repos has been changed in your workspace. +Summarizes multiple git repository status within a directory. -# Install -* `sudo apt install gawk` (find the alternative command if you're not using ubuntu) -* `sudo cp git-summary /usr/local/bin` +# Requirements + +## Linux +* `sudo apt-get install gawk` + +## MacOS +* `brew install coreutils` # Usage -* cd into a directory where you have multiple git repos you wanna check. For example: `cd Workspace` -* `git summary` (Checks the remotes to see if they have changes you do not or vica versa) -* `git summary -l` (Only checks for local changes and thus is much faster) +Call `git-status.sh [options]` from within a directory containing git repos to get their current status. + +Options are listed below: +* **-h**: Print help and exit. +* **-l**: Local status lookup. Checks only local changes which is faster as there is no need to fetch the remote. +* **-d**: Deep lookup. Will look for any git repos within the entire current directory tree. Can be slowish for large trees. + +General usage is as follow # Credits -Thanks for the amazing people who made the original git-summary bash script +A big thanks to the amazing people that wrote the original versions of git-summary: + +* **Forked from** [lordadamson](https://github.com/lordadamson/git-summary) * [mzabriskie](https://github.com/mzabriskie) * [CycleMost](https://github.com/CycleMost) * [lmj0011](https://github.com/lmj0011) * [gimbo](https://github.com/gimbo) * [zartc](https://github.com/zartc) -It all started [here](https://gist.github.com/mzabriskie/6631607) :heart: +It all started [here](https://gist.github.com/mzabriskie/6631607) !
diff --git a/git-summary.sh b/git-summary.sh @@ -1,6 +1,6 @@ #!/bin/bash -# git-summary - summarise git repos at some path +# git-summary - summarize git repos at some path # # Forked from https://github.com/lordadamson/git-summary # @@ -9,9 +9,9 @@ usage() { sed 's/^ //' <<EOF - git-summary - summarise git repos at some path + git-summary - summarize git repos at some path - Usage: git-summary [-h] [-l] [-d] [path] + Usage: git-summary.sh [-h] [-l] [-d] [path] Given a path to a folder containing one or more git repos, print a status summary table showing, for each repo: @@ -88,7 +88,7 @@ git_summary() { local f for f in $repos ; do - summarise_one_git_repo $f "$template" "$local_only" >&1 + summarize_one_git_repo $f "$template" "$local_only" >&1 done } @@ -122,7 +122,7 @@ print_header () { } -summarise_one_git_repo () { +summarize_one_git_repo () { local f=$1 local template=$2
: nply/git-summary