Skip to content

Instantly share code, notes, and snippets.

@iilei
Last active February 18, 2024 10:14
Show Gist options
  • Save iilei/a724dcfe15dc1e6639eef5e69d813e57 to your computer and use it in GitHub Desktop.
Save iilei/a724dcfe15dc1e6639eef5e69d813e57 to your computer and use it in GitHub Desktop.
get git repo https uri
git remote --v | grep "origin" | head -1 | sed -r 's:.*\s+(\S+)\s+.*$:\1:g' | sed -r 's:git@([^/]+)\:(.*\.git):https\://\1/\2:g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment