How to debug “Pull request cannot be automatically merged.” in TFS?

家住魔仙堡 提交于 2019-12-06 08:45:29

Git is very good at automatically merging file changes in most circumstances, most pull requests can be "automatically merged" which means there are no conflicts between it and the target branch.

However, if somebody else makes a change to one of the same files as you TFS will no longer attempt to merge your branch. If TFS could not offers suggestions on how to correct this. You may get this kind of error info "Pull request cannot be automatically merged."

You could double check this by pull down the two server branches to local and compare with each other. If there some conflicts, suggest you take a look at resolve merge conflicts.

Some similar issue for your reference:


Besides, to avoid this kind of issue, you could set up the branch policy to protect your branch. After you set up a branch policy, others cannot directly push changes to the branch. Changes to the branch are only made through pull requests.

Means you don't have the latest master.

You're supposed to pull the latest master, merge it into your feature branch fixing all conflicts, then do your pull request.

You can find a little report about the job that is supposed to execute the merge during the pull request on a dedicated page of the web server. You can find it in http://my.tfs.server:8080/tfs/_oi or https://my.tfs.server/_oi then search for a job named Git Native MergeJob. You must have administrative rights to access it.

Depending on what the issue is, you may have the exception and a callstack that can help understand why "Pull request cannot be automatically merged".

Most of the time, you'll find that a file is "too big" to be handled by TFS, see this issue on github.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!