-3

When I merge branches with the main branch, I merge them directly with the main branch, forgetting to push to the remote branch, and then merge and push the main branch, which shows that there are 10 unplugged submissions that can not complete the push. How can I handle this error?

Screenshot

torek
  • 448,244
  • 59
  • 642
  • 775

1 Answers1

3

A normal approach would be to create and push a new branch from master and then raise a pull request against the master branch.

You can create a new branch from master using

git checkout -b new_branch

Another way which I would not recommend to use will be to remove the restrictions if you are the admin of the repository and don't want to use the solution mentioned above

NOTE: The sole purpose of protected branches is to reject the force push and normal push from everyone but the users with such permissions

Read more here https://docs.gitlab.com/ee/user/project/protected_branches.html

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88