# Problem with pull request and protected branch

**URL:** <https://forum.gitea.com/t/problem-with-pull-request-and-protected-branch/354>\
**Category:** Install/Maintain/Configure\
**Created:** [June 19, 2018, 12:53pm UTC](https://forum.gitea.com/t/problem-with-pull-request-and-protected-branch/354 "2018-06-19T12:53:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dualarrow](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dualarrow](https://forum.gitea.com/u/dualarrow)\
**Post date:** [June 19, 2018, 12:53pm UTC](https://forum.gitea.com/t/problem-with-pull-request-and-protected-branch/354/1 "2018-06-19T12:53:25Z")

</div>

I’ve been trying to get pull requests to work the way I think they should (I’m somewhat of a git newbie) as follows

I have a repo with a protected master with only “Enable branch protection” checked. In the repos settings, I have “pull requests”, “ignore whitespace for conflicts” and “enable commit mergind” checked.

Using Sourcetree, I create a new local branch named test, I edit a file and stage and commit it. I then push test to the origin server. I then go to gitea web interface and select the repo I’m applying the pull request to and select the “test” branch. I then click on the green icon to the left of the branch to create a pull request. I fill in the details and complete the pull request.

As the same user, I check the pull requests and see mine there. I select it and apply it. At this stage everything looks good. I perform a pull on master and I get what looks like a merge with master from test to create an intermediate merge, and another merge between this intermediate and master. I also end up with a push required which seems odd.

If I perform a reset to the intermediate merge, then all is good and works fine, but without this reset I cant pull as my head is in front of the origin.

I’m sure I’m doing something wrong, but I cant see what it is.

Does anyone have any suggestions ?

---

<div class="post-metadata">

**Author:** ![dualarrow](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dualarrow](https://forum.gitea.com/u/dualarrow)\
**Post date:** [June 19, 2018, 2:08pm UTC](https://forum.gitea.com/t/problem-with-pull-request-and-protected-branch/354/2 "2018-06-19T14:08:57Z")

</div>

After a further hour of investigating, I believe I found the problem.

In my git global config I had

merge.ff=false

Which if I understand it correctly would have created the extra merge as I prevented it from doing a ff. Changing the option to true has stopped the extra merge and all is well now.
