diff --git a/git-hangman-lab/scripts/repo b/git-hangman-lab/scripts/repo index 73f6932..9fbd63b 100755 --- a/git-hangman-lab/scripts/repo +++ b/git-hangman-lab/scripts/repo @@ -341,6 +341,11 @@ do_get_latest() { echo "Fetching: $REPO_NAME ($BRANCH)" git -C "$REPO_DIR" fetch origin "$BRANCH" 2>/dev/null || true git -C "$REPO_DIR" checkout "$BRANCH" 2>/dev/null || git -C "$REPO_DIR" checkout -b "$BRANCH" "origin/$BRANCH" 2>/dev/null || true + if [[ "$FORCE" == "true" ]]; then + git -C "$REPO_DIR" reset --hard "origin/$BRANCH" 2>/dev/null || true + else + git -C "$REPO_DIR" merge --ff-only "origin/$BRANCH" 2>/dev/null || true + fi if [[ "$RECURSIVE" == "true" ]]; then echo "Updating submodules..."