Support no local checkout of main/master branch in git sync
Closed this issue · 0 comments
Cali0707 commented
We currently are assuming that the user has a local checkout of main/master. This can lead to issues (as experienced by @inesqyx) where the script throws a lot of warnings/errors. We should update the script to:
- Check if there is a local copy of the branch `git branch -l "${BRANCH}"
- If not, run
git checkout --track "origin/${BRANCH}"
to get a copy of the branch