From 1cd3f2708468a7e1ef8fae8d0033ed52374550ac Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 23 Nov 2021 15:36:24 +0100 Subject: [PATCH] config/git: pull easier --- .config/git/config | 2 +- .local/bin/scripts/git-l | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/git/config b/.config/git/config index e5de836..9b0a119 100644 --- a/.config/git/config +++ b/.config/git/config @@ -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 diff --git a/.local/bin/scripts/git-l b/.local/bin/scripts/git-l index a830789..3e54d47 100755 --- a/.local/bin/scripts/git-l +++ b/.local/bin/scripts/git-l @@ -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; }