dotfiles/.local/bin/scripts/git-l

6 lines
226 B
Plaintext
Raw Normal View History

#!/bin/sh
2021-11-23 14:36:24 +00:00
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; }