op.sh: fix switch on fresh install

This commit is contained in:
Adeeb Shihadeh
2025-08-28 11:49:31 -07:00
parent 3e2549f2b8
commit 9fcac06297
+1
View File
@@ -365,6 +365,7 @@ function op_switch() {
fi
BRANCH="$1"
git config --replace-all remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch "$REMOTE" "$BRANCH"
git checkout -f FETCH_HEAD
git checkout -B "$BRANCH" --track "$REMOTE"/"$BRANCH"