【发布时间】:2020-10-07 14:57:49
【问题描述】:
今天我尝试合并两个分支,但遇到了冲突。我使用 Visual Studio 2019 Team Explorer,.gitconfig 是这样设置来启动 KDiff3 的:
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/bin/kdiff3.exe
trustExitCode = false
到目前为止,这一直很好,但是今天在文件的基本版本中存在 Git 的冲突标记。像这样的:
Common code
<<<<<<<<< Temporary merge branch 1
One version of code
=========
Another version of code
>>>>>>>>> Temporary merge branch 2
More common code
这从未发生过。这些标记不是仅用于使用文本文件手动合并吗?关于如何解决这个问题的任何想法?
编辑:
另外,直接从命令行使用 git 具有相同的标记,但我不知道以前是否存在这些标记,因为我几乎从不使用命令行。这是我使用的命令:
git mergetool -g FileName.cs
【问题讨论】:
标签: git visual-studio visual-studio-2019 git-merge kdiff3