From: Oleg Broytman Date: Thu, 14 Dec 2023 20:04:17 +0000 (+0300) Subject: Feat(update-remotes): Reset `master` if fast-forward failed X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=684b1b0977c20fe1ffe172fc080854adc8031681 Feat(update-remotes): Reset `master` if fast-forward failed --- diff --git a/update-remotes b/update-remotes index b164567..2eb9427 100755 --- a/update-remotes +++ b/update-remotes @@ -16,7 +16,7 @@ elif [ -z "$current" ]; then exit 1 fi -git pull --ff-only current master && +{ git pull --ff-only current master || git reset --hard current/master } && web="`git config --get --path remote.web.url`" && if [ -n "$web" ]; then