]> git.rmz.io Git - dotfiles.git/blobdiff - git/config
git: add remote-to-ssh alias to convert https? remotes to git@...
[dotfiles.git] / git / config
index 801601a0c7538f05491da58ab96979ecb3ba429a..28e18e4c60974a901747fda1daa3475b270660ac 100644 (file)
@@ -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"