Skip to content

Instantly share code, notes, and snippets.

@seignovert
Last active May 28, 2021 07:44
Show Gist options
  • Save seignovert/9b896cc8d2f5e81c2c556b7f9d734a7e to your computer and use it in GitHub Desktop.
Save seignovert/9b896cc8d2f5e81c2c556b7f9d734a7e to your computer and use it in GitHub Desktop.
[Git] Open git remote alias (macOS)

Open git remote alias (macOS)

Setup:

git config --global alias.open "!git ls-remote --get-url | sed 's/https:\\/\\//git@/' | sed 's/:/\\//g' | sed 's/\\.git//' | sed 's/git@/https:\\/\\//' | xargs open"

Usage:

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