Last active
August 9, 2022 18:57
-
-
Save chris-peterson/9ae174196bfe5dbd25d97a75c7fabd9c to your computer and use it in GitHub Desktop.
quickly jump from terminal to web ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if git rev-parse --is-inside-work-tree 2>/dev/null; then | |
open "https://$(echo $(git remote get-url origin | sed 's/git@//' | sed 's/\.git//' | sed 's/:/\//'))" | |
else | |
echo "'$PWD' is not a git repo" | |
fi > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
copy the contents of this file to
/usr/local/bin
, alongside files likegit-shell
make the file executable
now you can use
git web
from any directory