From 26cffcc308aaa83e59c70ba44049e7c6555844d3 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Mon, 14 Jan 2019 09:52:45 +0000 Subject: [PATCH] git: add remote-to-ssh alias to convert https? remotes to git@... --- git/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git/config b/git/config index 801601a..28e18e4 100644 --- a/git/config +++ b/git/config @@ -41,3 +41,5 @@ rebase = preserve [commit] verbose = true +[alias] + remote-to-ssh = "!f(){ local r=$1; git remote set-url $r $(git remote get-url $r | sed -r 's,https?://([^/]+),git@\\1:,'); };f" -- 2.48.1