git - Beyond Compare - 自动 merge 工作副本中的 "conflicted"文件(如果可能)

标签 git merge atlassian-sourcetree beyondcompare

我最近在 Git 中 merge 了两个分支。它们都在开发中太久了,因此在两个分支上都有很多文件被更改,所以 Git 将它们标记为“冲突”

当我在 Beyond Compare 中打开它们时,“不再有冲突”,因为它足够聪明,可以解决假定的冲突。因此,只需在外部 merge 工具(来自 SourceTree)中打开,然后单击保存即可。但是,有很多文件需要这个!有没有办法让 Beyond Compare 对我的工作副本中的所有冲突文件进行“批处理”?

更新

我的项目的 \.git\config 文件指定了以下内容,我认为这会强制 Beyond Compare 4 (Pro) 自动 merge 文件,但事实并非如此。可能是无效配置?我已经三重检查了:(

[diff]
    tool = bc4
[difftool]
    prompt = false
[difftool "bc4"]
    path = /c/Program Files/Beyond Compare 4/BComp.exe
[merge]
    tool = bc4
[mergetool]
    prompt = false
    keepBackup = false
[mergetool "bc4"]
    cmd = /c/Program Files/Beyond Compare 4/BComp.exe -automerge -ignoreunimportant -reviewconflicts "$LOCAL" "$REMOTE" "$BASE" "$MERGED" 
    trustExitCode = true

最佳答案

如果你有专业版,你可以传递 bcompare -automerge 开关,如 this page 所示。 .

关于git - Beyond Compare - 自动 merge 工作副本中的 "conflicted"文件(如果可能),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44309540/

相关文章:

python - 在 Pandas 中将两个数据合并在一起

git - 如何从以前的 Git 提交中删除文件

atlassian-sourcetree - Sourcetree安装-Atlassian登录卡住了

ruby-on-rails - 解决 Rails 孤立迁移的最佳方法是什么?

git - 如何在侧栏中突出显示自上次在 Sublime Text 3 中使用 Git 提交以来已修改的文件(就像 Atom 一样)?

svn - 显示在任何 SVN 分支中哪些文件已更改但尚未合并到主干

r - 合并较大数据的有效替代方法

git - 源树 : How to create multiple hotfix branches with Git Flow

git - 如何使 git stash 包含尚未暂存的新文件?

git - git在执行操作时会做什么:git gc-git prune