Created
August 9, 2020 20:15
-
-
Save zlocate/3889da8cdeb658a31f17363a4afea472 to your computer and use it in GitHub Desktop.
Extract and open in browser repository url (e.g for Github it's repo webpage)
This file contains hidden or 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
| #!/bin/bash | |
| cd "$(pwd)"; | |
| SITE_URL=$(git config --get remote.origin.url) | |
| if [ "$URL" ]; then | |
| echo Repository URL: "$URL" | |
| xdg-open "$URL" | |
| else | |
| echo "Git repository not found (or origin is empty)" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment