From 260253f53dd06832873d7163ed0d45695d8caaab Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 26 Jun 2022 18:15:20 +0200 Subject: [PATCH] small fixes --- push.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/push.sh b/push.sh index a7d6fdb..d51a9a5 100755 --- a/push.sh +++ b/push.sh @@ -2,14 +2,15 @@ date="$(date +%Y-%m-%d)" changedfiles=$(git diff --name-status|awk '{print $2}') +git pull --rebase upstream main if ! git switch "${date}"; then git switch -c ${date} upstream/main fi -git pull --rebase upstream main && \ git add . && \ git commit -m "${date}: ${changedfiles}" && \ +git pull --rebase upstream main && \ git push -f origin --set-upstream origin "${date}" && \ git switch main