From 35e9a03822ac93b9223d7c616a0c39ad00656136 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 23 Dec 2020 13:41:45 +0100 Subject: [PATCH] config/git: update some aliases --- .config/git/config | 2 +- .config/shell/git | 8 ++++---- .local/bin/git-l | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/git/config b/.config/git/config index df98eca..897dc43 100644 --- a/.config/git/config +++ b/.config/git/config @@ -118,7 +118,7 @@ luu = !git pull upstream $(git curbranch) && git push --no-verify p = push pf = push --force-with-lease - cap = git commit --all --amend --no-edit && git push --force-with-lease + cap = !git commit --all --amend --no-edit && git push --force-with-lease # COMMIT SHORTHANDS cme = commit -v --edit --message diff --git a/.config/shell/git b/.config/shell/git index a6e743b..c79d4a2 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -105,15 +105,15 @@ gitorigin() { # set repo as upstream or add a new remote gitupstream() { - if test "$2" + if test "$3" then - local name="$2" - git remote remove "$2" 2>/dev/null + local name="$3" + git remote remove "$3" 2>/dev/null else git remote get-url upstream 2>/dev/null && local name="$1" || local name="upstream" fi local origin="$(git remote get-url origin)" - git remote add -f $name "$(echo $origin | cut -d':' -f1):$1/$(echo $origin | cut -d'/' -f2)" + git remote add -f $name "$(echo $origin | cut -d':' -f1):$1/${2:-$(echo $origin | cut -d'/' -f2)}" git remote -v } # }}} diff --git a/.local/bin/git-l b/.local/bin/git-l index 16f19ac..8c856b1 100755 --- a/.local/bin/git-l +++ b/.local/bin/git-l @@ -1,2 +1,2 @@ #!/bin/sh -git pull --rebase --autostash "$@" || (printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && git rebase --abort) +git pull --rebase --recurse-submodules --autostash "$@" || (printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && git rebase --abort)