-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot merge Pullrequest with commits but without changes #6870
Comments
Why would you want to merge PR with no actual changes? |
Hi lafriks, hotfix: this ist the productive softwareversion Usually we create a feature-branch from "hotfix", fix a bug for "hotfix" on this feature-branch and merge it into "hotfix" and into "master". In this case the changes should not come into "master". If we don't merge into "master" the next developer will get my commit in his feature-branch and will merge it into "master". |
Having no changes means that both master and the pull request are the same. So there is no need to merge the branches, as merging would do nothing. ;) However I do agree that the note that there are merge conflicts is a bit misleading when there are no actual changes that can be merged. Maybe we should fix that message. |
Yes, I agree. There will no changes be done. But "master" still doesn't know about the commits done for the "hotfix" and undone in the feature-branch for "master". |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Stumbled upon the same issue right now. Earlier I said:
Which is incorrect. Even merges that do not contain changes should be merged in order to avoid having diverging branches because commits are missing in others. |
That's the point. ;)
|
I wonder does github or gitlab allow merging such PR? |
Bitbucket does. But i'm not sure if github or gitlab allows it. |
The stderr logged from Edit: I can confirm from the integration test that the patch file is indeed empty. |
[x]
):Description
This error always occurs while fixing a mergeconflict on a protected branch.
In the Example:
The protected branch is "master" for continuous development.
We release some software from the "hotfix"-branch. (also protected)
To fix bugs we use feature-branches and merge these with pullrequests into "master" and "hotfix".
There are constellations that changes for "hotfix" should not come into "master".
But we want to merge the feature-branch into both protected-branches, that other developers don't see these commits when merging their own pullrequest.
When mergeconflicts occur, we merge "master" into the feature-branch.
So we are merging the protected-branch "master" into the feature-branch "feature_for_master" to solve the mergeconflicts or undo the changes manually.
After that the pullrequest shows some commits (done in the feature-branches), but there are no changes left to bring into "master".
Now gitea doesn't allow to merge the pullrequest due to a mergeconflict.
Screenshots
The text was updated successfully, but these errors were encountered: