Skip to content

Commit

Permalink
Attempt at fixing new upstream merger
Browse files Browse the repository at this point in the history
  • Loading branch information
SakulFlee committed Jul 22, 2023
1 parent 391af8b commit 34f0faa
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/upstream_merger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ jobs:
echo "> Merging ..."
# https://stackoverflow.com/a/4912267
git switch -c tmp upstream/main
git merge -s ours origin/main # ignoring all changes from origin/main
git switch origin/main
git merge tmp # fast-forward to tmp HEAD, which is upstream/main
git branch -D tmp # deleting tmp
# Temporary branch as a clone of upstream/main
git switch -c tmp upstream/main
# Merge origin/main into tmp, ignoring changes not made by 'ours'
git merge -s ours origin/main
# Switch back to main
git switch main
# Fast-Forward merge tmp (upstream/main, but merged above) into main
git merge tmp
# Delete tmp
git branch -D tmp
echo "> Pushing ..."
git add --all || true
git commit -m "Upstream merge ($(date +%d.%m.%Y_%H:%M:%S))" || true
git push origin/main
git push origin main

0 comments on commit 34f0faa

Please sign in to comment.