TortoiseGit / Winforms:合并时解析Resource.resx [英] TortoiseGit / Winforms: Resolving Resource.resx When Merging

查看:163
本文介绍了TortoiseGit / Winforms:合并时解析Resource.resx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对TortoiseGit相当陌生。想知道,如果我在.resx文件上遇到冲突,在合并期间如何解决它?例如,我可以从菜单中选择使用它们,尝试进行拉动和推动,但这是正确的方法吗?我能以某种方式使用他们的产品并用我的项目更改重建产品吗?这些差异(以及与存储库相比混淆的内容)有很多 - 对许多人来说是真正的合并。感谢您的期待?

解决方案

这是一个尚未回答的旧问题。然而,解决resx文件中的冲突正在使我疯狂。主要的问题似乎是resx文件可以在更新时随机更改。 Visual Studio不关心订单。因此,由于元素位于两个resx文件的不同位置,可能会出现很多微不足道的冲突。



我发现答案是在合并之前按名称属性对resx文件进行排序。 这篇文章解释了它是如何完成的,并提供了一个简单的命令行工具。作者提到如何将它集成到不同的差异/合并工具中。他的例子是Beyond Compare 3(我使用)和这篇文章给出了关于如何进行整合。



我尝试过这种方式,并且第一次管理了GUI更改的分支合并,无需手动修复Visual中的东西Studio。



我希望这个答案是相关的,可以帮助人们,因为它帮助我


I am fairly new to TortoiseGit. Wondering, if I get a conflict on a .resx file, how do I resolve it during a merge? For example, I could select "using theirs" off of the menu, try to do a pull and push, but is this the right approach? Can I somehow use theirs and rebuild it with my project changes? The differences (as well as mixed up contents compared to the respository) are many - to many to do a real merge. Thanks for looking?

解决方案

This is an old question that has not been answered. However resolving conflicts in resx files is driving me nuts. The main issue seems to be that resx files can be changed randomly when updated. Visual Studio does not care about the order. As a result a lot of trivial 'conflicts' can arise because of elements being in different places in the two resx files.

I found the answer is to sort the resx files by name attribute before the merge. This article explains how it is done and provides a simple command line tool. The author refers to how it can be integrated into different diff/merge tools. His example is Beyond Compare 3 (which I use) and this article gives instructions on how to do the integration.

I tried this and for the first time I managed a merge of branches with GUI changes without loss or hair or hours of manually repairing things in Visual Studio.

I hope this answer is relevant and may help folks as it helped me

这篇关于TortoiseGit / Winforms:合并时解析Resource.resx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆