GitHub Actions: Automated Commit Conflicts with Changes to Main
The machine created a commit on the old repository state and git push reports non-fast-forward. Between checkout and publication someone added new commits to the main and the branch history spread.
How to determine the source of the error
Compare SHA base slot with current SHA main and list of changed files.
Check whether both changes edit the content directory, the same JSON or other shared resources.
What to do step by step
1. Stop publication, download fresh main and make a controlled combination of changes with re-test quality.
2 . If the publication is automatic, use PR and tests instead of forcefully overwriting the current main.
How to check the score
After integration, both sides' articles are present, tests pass and history does not lose existing commits.
What to do
Do not use git push --force on the production branch to avoid conflict.