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)