简体   繁体   English

解决一堆Visual Studio git冲突

[英]Solve a bunch of Visual Studio git conflicts

I have merged two git branches in VS.我在 VS 中合并了两个 git 分支。

I got about fivethousand conflicts, about a hundred of which were actual code.我遇到了大约五千个冲突,其中大约一百个是实际代码。 These hundred I happily resolved.这一百我高兴地解决了。

Now there are still about fivethousand conflicts left, all of them being that binary files by the same name were added to branch 2 and changed in branch 1. Not sure, but I think the file content should even be the same.现在还剩下大约五千个冲突,都是同名的二进制文件被添加到分支 2 并在分支 1 中更改。不确定,但我认为文件内容应该是相同的。

How can I resolve these conflicts, automatically, without doing it one file at a time, and without losing my already-merged code files?如何自动解决这些冲突,而不是一次处理一个文件,并且不会丢失我已经合并的代码文件?

I tried to delete all these binary files from the checkout location, but not only didn't this resolve the problem, it even stopped VS from accepting manual resolve, so I had to restore them all from recycle bin.我试图从结帐位置删除所有这些二进制文件,但这不仅没有解决问题,甚至阻止了 VS 接受手动解析,因此我不得不从回收站中将它们全部还原。

There is currently not a way to bulk resolve Git conflicts in Visual Studio.目前没有办法在 Visual Studio 中批量解决 Git 冲突。 However, you can resolve conflicts through the command line, and Visual Studio will no longer report these as conflicted files.但是,您可以通过命令行解决冲突,Visual Studio 将不再将这些报告为冲突文件。

After you resolve and stage the resolution of a conflict through the command line, Visual Studio will no longer report that as a conflicted file.通过命令行解决并暂存解决冲突后,Visual Studio 将不再将其报告为冲突文件。

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

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