From e42026d51cdb6fe76576d5fb938c3fb623db6a01 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sun, 4 Oct 2026 16:37:48 +0200 Subject: [PATCH] chore: improve git remote type switch --- scripts/{change-git-remote => git-switch-remote-type} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename scripts/{change-git-remote => git-switch-remote-type} (95%) 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