如何撤消“解决”在 TortoiseGit 中?
我在本地 Git 存储库中合并了两个分支,但存在很多冲突。认为 TortoiseGit 上下文菜单中的“解决”会将我带到冲突解决 GUI,我单击了它 - 只是意识到我只是将所有冲突标记为已解决,而没有对它们执行任何操作。因此,我有一堆未标记的文件,其中包含:
master<<<<<<<<<
some change
=======
some other change
>>>>>>>>>>branch
结构,而 Git 不知道它们仍然是一个问题。
如何撤消将冲突标记为已解决,即再次将它们标记为冲突?
I have merged two branches in a local Git repository, with a bunch of conflicts. Thinking that "Resolve" in the TortoiseGit context menu would take me to a conflict resolution GUI, I clicked it - just to realize I just marked all conflicts as resolved without doing anything about them. Thus I have a bunch of unmarked files with:
master<<<<<<<<<
some change
=======
some other change
>>>>>>>>>>branch
constructs in them, and Git doesn't know they're still a problem.
How do I undo this marking of conflicts as resolved, i.e., mark them as conflicts again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不使用 Tortoise git,但你应该能够硬重置回合并和重新合并之前的状态。由于您没有对冲突执行任何操作,因此重新合并将为您提供相同的输出。
我刚刚对此进行了测试。
签出您的功能分支后,右键单击合并提交之前的提交日志(在功能分支上)。
点击“将 feature_branch 重置到此处”。在随后的窗口中选择硬。
您的合并现已撤消,将其合并回去,它应该为您提供相同的冲突标记,但您需要解决它们。
I don't use tortoise git, but you should be able to just hard reset back to before the merge and re-merge. Since you didn't do anything with the conflicts, the re-merge will give you the same output.
I just tested this.
With your feature branch checked out, right click on the log on the commit right before your merge commit(on the feature branch).
Click on "Reset feature_branch to here". In the subsequent window select hard.
Your merge is now undone, merge it back in and it should give you the same conflict markers, but you will need to resolve them.
在 Git 命令行上,您必须将
git checkout
与-m
/--merge
标志或--conflict= 一起使用<样式>
选项:On the Git command line you have to use
git checkout
with the-m
/--merge
flag or the--conflict=<style>
option: