Skip to content

Commit

Permalink
Merge pull request #1 from bill-auger/master
Browse files Browse the repository at this point in the history
  • Loading branch information
danimesq authored Oct 19, 2021
2 parents 02e6320 + 23a4d1d commit 4e53024
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 60 deletions.
5 changes: 5 additions & 0 deletions git-branch-status-subtree/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!gbs-config.sh.inc.example
!git-branch-status
!LICENSE
!README.md
16 changes: 8 additions & 8 deletions git-branch-status-subtree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ EXAMPLES:
| feature-branch | (even) | (ahead 2) | origin/feature-branch |
| master | (behind 1) | (even) | origin/master |
# compare two arbitrary branches (either local and either remote)
# compare two arbitrary branches - local or remote
$ git-branch-status local-arbitrary-branch fork/arbitrary-branch
| local-arbitrary-branch | (even) | (ahead 1) | fork/arbitrary-branch |
$ git-branch-status fork/arbitrary-branch local-arbitrary-branch
| fork/arbitrary-branch | (behind 1) | (even) | local-arbitrary-branch |
# show all branches - including those synchronized, non-tracking, or not checked-out
# show all branches - local and remote, regardless of state or relationship
$ git-branch-status -a
$ git-branch-status --all
| master | (even) | (ahead 1) | origin/master |
*| master | (even) | (ahead 1) | origin/master |
| tracked-branch | (even) | (even) | origin/tracked-branch |
| (no local) | n/a | n/a | origin/untracked-branch |
| local-branch | n/a | n/a | (no upstream) |
Expand All @@ -77,7 +77,7 @@ EXAMPLES:
# show the current branch
$ git-branch-status -b
$ git-branch-status --branch
| current-branch | (even) | (ahead 2) | origin/current-branch |
*| current-branch | (even) | (ahead 2) | origin/current-branch |
# show a specific branch
$ git-branch-status specific-branch
Expand All @@ -98,7 +98,7 @@ EXAMPLES:
# show all local branches - including those synchronized or non-tracking
$ git-branch-status -l
$ git-branch-status --local
| master | (even) | (ahead 1) | origin/master |
*| master | (even) | (ahead 1) | origin/master |
| tracked-branch | (even) | (even) | origin/tracked-branch |
| local-branch | n/a | n/a | (no upstream) |
Expand All @@ -111,9 +111,9 @@ EXAMPLES:
# show all branches with timestamps (like -a -d)
$ git-branch-status -v
$ git-branch-status --verbose
| 1999-12-31 local | n/a | n/a | (no upstream) |
| 1999-12-31 master | (behind 1) | (even) | 2000-01-01 origin/master |
| 1999-12-31 tracked | (even) | (even) | 2000-01-01 origin/tracked |
| 1999-12-31 master | (behind 1) | (even) | 2000-01-01 origin/master |
| 1999-12-31 tracked | (even) | (even) | 2000-01-01 origin/tracked |
*| 1999-12-31 local-wip | n/a | n/a | (no upstream) |
```


Expand Down
28 changes: 28 additions & 0 deletions git-branch-status-subtree/gbs-config.sh.inc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
###############################################################################
# optional user-defined config for the 'git-branch-status' program #
#-----------------------------------------------------------------------------#
# * copy this file to: ./gbs-config.sh.inc (or $GBS_CFG_FILE) to customize #
# * the text in this file must be valid BASH #
# * you can also export these configuration options from the environment #
# as well as an alternate location of this file (as $GBS_CFG_FILE) #
# * environment variables will over-ride those defined in this file #
# * environment variables should be named similarly to those in this file #
# with the CFG_* prefix replaced with GBS_* #
# eg: export GBS_CFG_FILE=~/.config/git-branch-status/config.sh.inc #
# eg: export GBS_FETCH_PERIOD=0 #
###############################################################################


# number of minutes between automatic `git fetch --all` calls
# 0 => always, -1 => never (default: -1)
readonly CFG_FETCH_PERIOD=-1


# writable filesystem location for storage of the last-fetch timestamp
# (default: ~/.GBS_LAST_FETCH)
readonly CFG_LAST_FETCH_FILE=~/.GBS_LAST_FETCH


# whether or not to present ANSI colors
# 0 => no, 1 => yes (default: 1)
readonly CFG_USE_ANSI_COLOR=1
Loading

0 comments on commit 4e53024

Please sign in to comment.