/gh_reveal

Do not open browsers; let terminal show (default all) or (specific) remote in browser. From your current git project.

Primary LanguageShell

reveal_brew

in terminal, quickly open the git project in default browser.

Install with Homebrew (macintosh computers):

brew tap michaeldimmitt/reveal &&
brew install reveal;

Implementation

reveal

want to reveal all of your projects in a given directory?
for d in ./*/ ; do (cd "$d" && echo "$d" && reveal); done

or as with my environment maybe all of your projects are in a folder that is subdivided by category folders.
for d in ./*/ ; do (cd "$d" && echo "$d" && for p in ./*/ ; do (cd "$p" && echo "$p" && reveal); done); done

reveal gif

Additional Examples

Reveal takes a single command line argument.
This argument is the remote you would like to open for the current directory git project.
If no remote is specified it will reveal all remotes on the project in the browser.
For most users this is just the one remote either gitlab or github (origin).

  1. reveal origin
  2. reveal gitlab
  3. reveal <your remote name here>

Not sure what remote means? (context .git)
cd into your git project and type git remote -v

How does it work?

through the use of command:

git remote -v

gather's all remotes for project
and proceeds to filter the output into url's
piping each as a unique url opens all the stuff.

zshrc plugin coming soon!

Alternative install/uninstall experience:

Clone and cd into the project:

git clone https://github.com/MichaelDimmitt/gh_reveal.git && cd gh_reveal;

install

./install.sh;

uninstall

./uninstall.sh