[英]Trouble merging master to my feature branch using Intellij/Git
My procedure:我的程序:
I get the following error:我收到以下错误:
Couldn't check the working tree for unmerged files because of an error.
由于错误,无法检查未合并文件的工作树。 Committing is not possible because you have unmerged files.
提交是不可能的,因为您有未合并的文件。
What am I missing?我错过了什么?
Thank you for your help.感谢您的帮助。
Although you may have resolved the conflicts in the files after the merge, Git does not actually know this.尽管您可能在合并后解决了文件中的冲突,但 Git 实际上并不知道这一点。 Instead, it still sees the files in conflict.
相反,它仍然看到冲突的文件。 To resolve this, you need to
git add
each file which was in conflict to mark it as resolved.要解决此问题,您需要
git add
每个冲突的文件以将其标记为已解决。
If you right click each file in conflict in IntelliJ, there should be a menu item for adding to version control.如果在 IntelliJ 中右键单击每个冲突的文件,应该有一个用于添加到版本控制的菜单项。 You may also use the Project menu on the top to do this.
您也可以使用顶部的“项目”菜单来执行此操作。
Once you have added each file, Git should report that all conflicts have been resolved, and you may commit the merge.添加完每个文件后,Git 应该报告所有冲突都已解决,您可以提交合并。
For my IntelliJ, if I resolve conflicts in it, it does add the files automatically.对于我的 IntelliJ,如果我解决了其中的冲突,它会自动添加文件。 For your case, go to the console/terminal run
git status
to check if all files are green, if not do git add .
对于您的情况,请转到控制台/终端运行
git status
检查所有文件是否为绿色,如果不是则执行git add .
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.