Can't push commits to Pull Request in GitHub

I set up an private free github repo to work on a project with my friends. I set up a branch protection rule as you can see in listing 1. So when I want to push new commits to my pull request I get an error.

remote: error: GH006: Protected branch update failed for refs/heads/neo-14-block-prefab-hp-system.        
remote: error: At least 1 approving review is required by reviewers with write access.        
error: failed to push some refs to '[email protected]:robinsadeghpour/nogame_prototypes.git'
To github.com:robinsadeghpour/nogame_prototypes.git
!   refs/heads/neo-14-block-prefab-hp-system:refs/heads/neo-14-block-prefab-hp-system   [remote rejected] (protected branch hook declined)

How can I enable pushing commits to my open pull request?

branch protection rule

Upvotes: 0

Views: 2662

Answers (1)

Jayanth
Jayanth

Reputation: 154

You can commit only to a non protected branch. Create a new branch and push your changes, then create a new pull request to the branch you want to merge with.

Upvotes: 1

Related Questions