Skip to content

git-ops action errors when pushing commits to main if other commits have already been pushed to main #8

@sevenseacat

Description

@sevenseacat

eg. going through merging a bunch of tiny PRs really quickly.

Each build until the last one will fail, because pushing the new commit with the version number/changelog change, is not a fast-forward -

Run git push "***github.com/MyOrg/my-app" HEAD:refs/heads/main refs/tags/v0.99.1
To https://github.com/MyOrg/my-app
 * [new tag]         v0.99.1 -> v0.99.1
 ! [rejected]        HEAD -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/MyOrg/my-app'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Process completed with exit code 1.

This is super annoying and makes the build history look a lot worse than it should be!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions