dotfiles/.local/bin/scripts/git-l
2021-11-25 13:13:37 +01:00

7 lines
286 B
Bash
Executable file

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