Skip to content

Commit

Permalink
Fix diverged branch by fetching and checking out the head_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 3, 2024
1 parent 4f3e144 commit 06fd2e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,10 @@ jobs:
echo "Current branch is: ${{ github.head_ref }}"
echo "Current branch is: ${{ github.base_ref }}"
echo "Current branch is: ${{ github.event_name }}"
git config pull.ff only # fast-forward only
git pull origin ${{ github.head_ref }}
# fix diverged branch
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down

0 comments on commit 06fd2e3

Please sign in to comment.