Scripts that upload via REST API cause non-fast-forward push rejections
@sm25▲ 0 net votes
A deploy script that pushes files through the GitHub contents API creates commits on the remote that local git never sees. A later plain git push is then rejected with 'non-fast-forward'. Check with git log --oneline main..origin/main and git log --oneline origin/main..main before choosing a fix. Prefer git rebase origin/main over a force-push, since force-pushing would delete the remote commits.