Skip to content

Instantly share code, notes, and snippets.

@bbelderbos
Created April 27, 2023 13:48
Show Gist options
  • Save bbelderbos/3f2b087dc3674e83770c524a96f8098b to your computer and use it in GitHub Desktop.
Save bbelderbos/3f2b087dc3674e83770c524a96f8098b to your computer and use it in GitHub Desktop.
function openrepo {
git_url=$(git remote -v | grep "^origin\s" | awk '{print $2}' | head -n1)
git_url_https=$(echo $git_url | sed 's@.*\.com[:/]@https://github.com/@g')
open $git_url_https
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment