]> git.phdru.name Git - git-scripts.git/blobdiff - update-remotes
Feat(update-remotes): Fetch additional branches if there're any
[git-scripts.git] / update-remotes
index b164567bc369ac2ddc58d733bf22bb1a85b654dc..6fabc29a60439b086d47c6fbbb0b17e8e1c7e5db 100755 (executable)
@@ -16,7 +16,8 @@ elif [ -z "$current" ]; then
    exit 1
 fi
 
-git pull --ff-only current master &&
+git fetch current &&
+{ git pull --ff-only current master || git reset --hard current/master ; } &&
 
 web="`git config --get --path remote.web.url`" &&
 if [ -n "$web" ]; then