commit 6c2689588356c04fffd9403218d42d6194b199b8
parent bf6daa3eb26c558ae9221451170664ee2b8837be
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Wed, 15 Apr 2020 17:30:58 +0200
git: convert https remote to ssh
Former-commit-id: 83da31f0fe7953f3b8d15839b607f711a4529c91
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/git/gitconfig b/git/gitconfig
@@ -59,6 +59,7 @@
pf = "!git-pull-menu"
fuckit = reset --hard HEAD
fuckitall = reset --hard origin/master
+ ssh = "!git remote get-url origin | sed -E 's|^https?://([^/]+)/(.+)|git@\\1:\\2|' | tr -d '\n'"
home = "!git remote get-url origin | sed -E 's|^git@([^:]+):|https://\\1/|' | tr -d '\n'"
open = "!xdg-open $(git home)"
dad = "!curl https://icanhazdadjoke.com/ && echo && git add"