config/git: update some aliases
This commit is contained in:
parent
7737e65a89
commit
35e9a03822
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
# }}}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue