diff --git a/scripts/change-git-remote b/scripts/git-switch-remote-type similarity index 95% rename from scripts/change-git-remote rename to scripts/git-switch-remote-type index 6cef4ee..706ad56 100755 --- a/scripts/change-git-remote +++ b/scripts/git-switch-remote-type @@ -4,7 +4,7 @@ origin=$(git remote show origin) if [[ $(echo "$origin" | awk -e '/https/') != "" ]]; then remote=$(git remote show origin | awk -e '/Fetch/' | cut -d ":" -f 3) git_host=$(echo "$remote" | cut -d "/" -f 3) - git_repo=$(echo "$remote" | cut -d "/" -f 4-5) + git_repo=$(echo "$remote" | cut -d "/" -f 4-) git_branch=$(echo "$origin" | awk -e '/HEAD/' | cut -d ":" -f 2 | tr -d ' ') git remote remove origin git remote add origin git@$git_host:/$git_repo