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

4 lines
207 B
Bash
Executable File

#!/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)