Adds grts
This commit is contained in:
parent
d4fc3fe41f
commit
afe2f6ae3a
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Converts a http(s) remote to an ssh one
|
||||
remote=$(git remote -v | grep origin | head -n 1 | cut -d $'\t' -f 2 | cut -d ' ' -f 1)
|
||||
server=$(echo $remote | cut -d '/' -f 3)
|
||||
user=$(echo $remote | cut -d '/' -f 4)
|
||||
repo=$(echo $remote | cut -d '/' -f 5)
|
||||
git remote set-url origin git@$server:$user/$repo
|
||||
|
||||
|
Loading…
Reference in New Issue