From 86c3926b8ff25723262d7a1472a667bfcc2ffa4e Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 26 Jun 2022 20:13:20 +0200 Subject: [PATCH] small fixes --- push.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/push.sh b/push.sh index 70264548..b8ad3612 100755 --- a/push.sh +++ b/push.sh @@ -14,6 +14,7 @@ if ! grep name ~/.gitconfig && ! grep name ~/.git/config; then git config user.name "${name}" fi +# check if user has configured an email address in git and set it, if not if ! grep email ~/.gitconfig && ! grep email ~/.git/config; then echo "You need an email! It is not important. If you choose none, it will be 'info@bunteshaus.de'." echo "Write 'exit' or press 'Strg+c' to cancel." @@ -27,6 +28,10 @@ if ! grep email ~/.gitconfig && ! grep email ~/.git/config; then git config user.email "${email}" fi +if ! grep rebase ~/.gitconfig && ! grep rebase ~/.git/config; then + git config pull.rebase true +fi + # update from upstream/main git pull --rebase upstream main && \