Skip to content

Commit

Permalink
Git stash before any git checkout to avoid out-of-sync state (#7141)
Browse files Browse the repository at this point in the history
git stash before any git checkout to avoid out-of-sync state
  • Loading branch information
philippemnoel authored Aug 26, 2022
1 parent 3664d4e commit d657d65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/whist-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ jobs:
echo "Entering brave-browser..."
cd brave-browser
git stash
git checkout main
git fetch -p
git reset --hard origin/main
Expand All @@ -885,6 +886,7 @@ jobs:
echo "Entering src/brave (brave-core)..."
pushd src/brave
git stash
git checkout "${{ needs.whist-publish-build-config.outputs.branch }}"
git fetch -p
git reset --hard "origin/${{ needs.whist-publish-build-config.outputs.branch }}"
Expand All @@ -898,6 +900,7 @@ jobs:
echo "Entering src/whist (whist)..."
pushd src/whist
git stash
git checkout "${{ needs.whist-publish-build-config.outputs.branch }}"
git fetch -p
git reset --hard "origin/${{ needs.whist-publish-build-config.outputs.branch }}"
Expand Down Expand Up @@ -1361,6 +1364,7 @@ jobs:
# Log the branch, should always be `dev`, but we checkout just to be sure
git branch
git stash
git checkout dev
git pull
git branch
Expand Down

0 comments on commit d657d65

Please sign in to comment.