config/git: pull easier

This commit is contained in:
xeruf 2021-11-23 15:36:24 +01:00
parent 02c959ce70
commit 1cd3f27084
2 changed files with 5 additions and 3 deletions

View File

@ -151,7 +151,7 @@
rb = rebase
rbi = rebase --interactive
rbc = rebase --continue
rbu = rebase @{upstream}
rbu = rebase @{upstream} --autostash
rbm = !git rebase $(git main)
sta = stash

View File

@ -1,3 +1,5 @@
#!/bin/sh
git rev-parse @{upstream} >/dev/null 2>&1 || git branch --set-upstream-to=@{push}
git pull --rebase --autostash "$@" || (printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && git rebase --abort)
git rev-parse @{upstream} >/dev/null 2>&1 ||
git branch --set-upstream-to=@{push}
git pull --rebase --autostash "$@" 2>/dev/null ||
{ printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 && git rebase --abort; }