Skip to content

Commit

Permalink
Fix switch to another git branch (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex authored Oct 10, 2024
1 parent d897fe5 commit 4c04dbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/update-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ function update_repository() {
pushd $DIRECTORY
if [[ "$RESET_SOURCES" = 1 ]]; then
git reset --hard HEAD
if ! git show-ref --verify --quiet refs/remotes/origin/$BRANCH; then
git remote set-branches --add origin $BRANCH
git fetch origin --prune
fi
git switch $BRANCH
git clean -fdx
fi
Expand Down

0 comments on commit 4c04dbe

Please sign in to comment.