From: Samir Benmendil Date: Mon, 14 Jan 2019 09:52:45 +0000 (+0000) Subject: git: add remote-to-ssh alias to convert https? remotes to git@... X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/26cffcc308aaa83e59c70ba44049e7c6555844d3?ds=sidebyside git: add remote-to-ssh alias to convert https? remotes to git@... --- 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"