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
|
luu = !git pull upstream $(git curbranch) && git push --no-verify
|
||||||
p = push
|
p = push
|
||||||
pf = push --force-with-lease
|
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
|
# COMMIT SHORTHANDS
|
||||||
cme = commit -v --edit --message
|
cme = commit -v --edit --message
|
||||||
|
|
|
@ -105,15 +105,15 @@ gitorigin() {
|
||||||
|
|
||||||
# set repo as upstream or add a new remote
|
# set repo as upstream or add a new remote
|
||||||
gitupstream() {
|
gitupstream() {
|
||||||
if test "$2"
|
if test "$3"
|
||||||
then
|
then
|
||||||
local name="$2"
|
local name="$3"
|
||||||
git remote remove "$2" 2>/dev/null
|
git remote remove "$3" 2>/dev/null
|
||||||
else
|
else
|
||||||
git remote get-url upstream 2>/dev/null && local name="$1" || local name="upstream"
|
git remote get-url upstream 2>/dev/null && local name="$1" || local name="upstream"
|
||||||
fi
|
fi
|
||||||
local origin="$(git remote get-url origin)"
|
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
|
git remote -v
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/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