op/switch: fix ambiguous remote on checkout

This commit is contained in:
Adeeb Shihadeh
2024-12-11 19:27:35 -08:00
parent 3a6db78601
commit 3328845be1
+1 -1
View File
@@ -328,7 +328,7 @@ function op_switch() {
BRANCH="$1"
git fetch "$REMOTE" "$BRANCH"
git checkout -f --recurse-submodules "$BRANCH"
git checkout -f --recurse-submodules --track "$REMOTE"/"$BRANCH"
git reset --hard "${REMOTE}/${BRANCH}"
git clean -df
git submodule update --init --recursive