Skip to content

Instantly share code, notes, and snippets.

@kristopherjohnson
Last active November 13, 2024 15:19
Show Gist options
  • Save kristopherjohnson/bf07f434a140efaf2d94823348be580f to your computer and use it in GitHub Desktop.
Save kristopherjohnson/bf07f434a140efaf2d94823348be580f to your computer and use it in GitHub Desktop.
bash/zsh alias for opening the GitHub page for the current repo on macOS
# Open the current directory's GitHub repo in web browser
alias open-repo="open \"\$(git config --get remote.origin.url | sed -E 's/git@github.com:/https:\/\/github.com\//; s/\.git\$//')\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment