Skip to content

Instantly share code, notes, and snippets.

@GaurangTandon
Created February 14, 2021 06:49
Show Gist options
  • Save GaurangTandon/ba0c13b8cc9b7509b45ed17626277214 to your computer and use it in GitHub Desktop.
Save GaurangTandon/ba0c13b8cc9b7509b45ed17626277214 to your computer and use it in GitHub Desktop.
Bash command to allow cloning via SSH with HTTPS URL
# place this in your aliases file
ghcl() {
prefix=$(echo -n $1 | sed 's|https://github.com/|git@github.com:|')
git clone "$prefix.git"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment