[英]How to resolve branch conflicts in VSCode GitHub Pull Requests and Issues extension?
I can't figure out how to resolve the conflict in this pull request so that I can merge it.我不知道如何解决这个拉取请求中的冲突,以便我可以合并它。 How can I fix the problem using the VSCode GitHub Pull Requests and Issues GUI?
如何使用 VSCode GitHub Pull Requests and Issues GUI 解决问题?
There are only three lines that have changed, all within one file, for this pull request.对于这个拉取请求,只有三行发生了变化,都在一个文件中。 The pull request description and diff are shown in the first two images below, respectively.
拉取请求描述和差异分别显示在下面的前两个图像中。 Nothing there seems to be in conflict.
似乎没有任何冲突。 However, when I look at the code for the master branch that I am trying to merge into, shown in the third image, line 17 is different.
但是,当我查看要合并到的 master 分支的代码时,如第三张图片所示,第 17 行是不同的。 I think that is the conflict.
我认为这就是冲突。 Why doesn't that conflict show up in the diff?
为什么这种冲突没有出现在差异中? How can I keep line 17 from the master branch, add line 17 from the pull request below it, merge back to the master branch, and close the pull request?
如何从主分支保留第 17 行,从其下方的拉取请求中添加第 17 行,合并回主分支,然后关闭拉取请求? I haven't found a way to view the pull request code side by side with the master code and I'm not sure which I need to push updates to.
我还没有找到将拉取请求代码与主代码并排查看的方法,我不确定我需要将更新推送到哪个。
I am trying to merge the pink branch in the graphic below.我正在尝试合并下图中的粉红色分支。
You should be in the branch you are currently modifying (not master
) and first merge master
into this branch: under source control, click the three dots and select in the menu Branch
-> Merge Branch
(see screenshot) and select Master
.您应该在您当前正在修改的分支(不是
master
)中并首先将master
合并到该分支中:在源代码管理下,单击三个点并在菜单中选择Branch
-> Merge Branch
(参见屏幕截图)并选择Master
。 It will say you now have conflicts that you need to resolve manually, and then you should be clear to go.它会说你现在有需要手动解决的冲突,然后你应该清楚了。
First of all, you must click "Exit Review Mode" to become back the regular code!首先,您必须点击“退出审核模式”才能恢复正常代码! After them, you must approve the changes (with or without a comment) and then, you must go to GitHub and click there "Merge pull request" (with or without a comment) and the Pull Request would merge back to the branch, where you started/created the Pull Request.
在他们之后,您必须批准更改(有或没有评论),然后,您必须转到 GitHub 并单击那里的“合并拉取请求”(有或没有评论),拉取请求将合并回分支,其中您启动/创建了拉取请求。
Github Pull Requests Extension for Visual Studio Code 用于 Visual Studio 代码的 Github 拉取请求扩展
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.