We use Bitbucket server at our company.
Today it happened that a multi-merge pull request (branch->stable->master, as we have a production branch set) failed on the stable->master part because of conflicts.
Nothing to worry. Bitbucket opens another pull request automatically to merge missing changes from stable to master branch.
The problem is that since I have set branch permissions to allow modifications to master branch only via pull requests I am unable to follow Bitbucket's instructions for manual merge
Bitbucket asks me to do the following:
Automatic merge failed because there were conflicts. You must resolve the conflicts by merging downstream only i.e. merging the source branch into the target branch. Step 1: Fetch the changes (saving the source branch as FETCH_HEAD). git fetch origin stable Step 2: Checkout the target branch and merge in the changes from the source branch. Resolve conflicts. git checkout master git merge FETCH_HEAD Step 3: After the merge conflicts are resolved, stage the changes accordingly, commit the changes and push. git commit git push origin HEAD Step 4: The pull request will be updated and marked as merged.
Ok, but when I try to push the changes to master branch I get a fancy error message:
remote: *%%%%%. remote: %%% %%% remote: ,%# %% remote: %% %% remote: %# %% remote: %% % remote: %( %% remote: %%%%%%%%%%%%%%%%%%%%%%%%%%% remote: %#%*%#///////%# %%///////%%%%%% remote: ,% %*%%******%# %%******%(%%,% remote: %%/ %%/**%%/%%%%%%%(**#%( %%# remote: %% %%% %( remote: % .% remote: *% %%%%% .% remote: %# %% remote: .%% .%% remote: .%%.%%, %%%.%%/ remote: %%%%%%##%. #%%%%%. .%((%%%%%% remote: %%#(((((((((%%, #%%(((((((((#%%. remote: %%%((((((((((((((((((%%%, .%%%((((((((((((((((((#%%* remote: %%(((((((((((((((((((((((((%(((((((((((((((((((((((((#%. remote: ,%(((((((((((((((((((((((((((((((((((((((((((((((((((((((%# remote: %#((((((((((((((((((((((((((((((((((((((((((((((((((((((((% remote: %%%%%%%%%%%%%(((((((((((((((((((((((((((((((((%%%%%%%%%%%%% remote: %% %####((((((###%%%%%%%%#(((((((((% ,% remote: ,% %%%%%%#. %%%((((((%* %% remote: #% %%%# %% remote: .% .%%%%%%%%% %# remote: % #%%% % remote: % %%%% %* remote: /%************/#%%%%%%######%%* ..,*/(%% remote: %%######(((((((##################%% remote: %%######(((((((((((((((((((((((((%% remote: //////////////%%%%%%%%#########################%%///////// /// remote: ---------------------------------------------------- remote: Branch refs/heads/master can only be modified through pull requests. remote: Check your branch permissions configuration with the project administrator. remote: ---------------------------------------------------- remote:
I am forced to push to another (temporary) branch from which to open a pull request.
Shouldn't Bitbucket server implement a check that allows direct pushing to a protected branch (with respect to other permissions, e.g. only me and few coworkers can modify the master branch) if that push merges an open pull request?
Or am I doing something wrong?
I had this same issue and was able to fix it by following the instructions up to the point where it said to git push origin HEAD and instead pushing to my feature branch with git push origin <feature-branch>. The pull request was updated, and all went as it should. The problem is that following the instructions leaves HEAD on the protected development branch.
Update: I ran in to this issue again, and my prior solution didn't work, because git believed the feature branch was up to date with all the changes I made in the development branch (which were without exception simply accepting the feature branch's versions).
But I found a different workaround: Don't check out the origin development branch and then pull from the feature branch, merge in development and try to push to the feature branch. Instead stay in the feature branch, pull from the development branch, merge there, and then push the results up to the feature branch.
The pull request gets updated, and you don't see the angry ASCII guardian because you're never trying to push to a protected branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
same issue here. BB should allow manual merge if there is a conflict and satisfies pre hook/merge check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Definitely!
The permissions say: "Prevent changes without a pull request", but pull request is there! It just requires manual merge.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have exactly same issue. This looks to me like a bug. Are there any news or nobody cares?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.