Skip to content

Instantly share code, notes, and snippets.

@chris-peterson
Last active August 9, 2022 18:57
Show Gist options
  • Save chris-peterson/9ae174196bfe5dbd25d97a75c7fabd9c to your computer and use it in GitHub Desktop.
Save chris-peterson/9ae174196bfe5dbd25d97a75c7fabd9c to your computer and use it in GitHub Desktop.
quickly jump from terminal to web ui
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
@chris-peterson
Copy link
Author

copy the contents of this file to /usr/local/bin, alongside files like git-shell
make the file executable
now you can use git web from any directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment