简体   繁体   English

如何将分支与 Eclipse Egit 合并

[英]How to merge branches with Eclipse Egit

I'm using Eclipse 4.15/2020-03 to syncronize two branches from git repo.我正在使用 Eclipse 4.15/2020-03 来同步来自 git repo 的两个分支。 I opened the Synchronize view and I see all the differences, but... I cannot edit the file, how can I edit it?我打开了同步视图并看到了所有差异,但是...我无法编辑文件,我该如何编辑它?

I never use the Synchronize view with git.我从不使用 git 的同步视图。 I imagine it could work, I just focus on merging.我想它可以工作,我只是专注于合并。

You will have a particular branch checked out.您将签出一个特定的分支。 Your task is to merge a different branch into that branch.您的任务是将不同的分支合并到该分支中。

After doing a "fetch" to ensure that your branch metadata is up to date, right-click on the repository and select "Merge...".在执行“获取”以确保您的分支元数据是最新的后,右键单击存储库并选择“合并...”。 Select the branch you want to merge into your current branch.选择要合并到当前分支中的分支。

After that completes, inspect the "Git Staging" view.完成后,检查“Git Staging”视图。 Any files that merged without conflicts will be in the "Staged Changes" list, and files with conflicts will be in the "Unstaged Changes" list.任何合并而没有冲突的文件都将在“暂存更改”列表中,有冲突的文件将在“未暂存更改”列表中。

If you want to inspect the files with conflicts, double-clicking on each one will go into the compare view, but you can also right-click on each and select "Open Working Tree Version" to see the raw file contents, with conflict markers.如果要检查有冲突的文件,双击每个文件将进入比较视图,但您也可以右键单击每个文件并选择“打开工作树版本”以查看原始文件内容,带有冲突标记.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM