我不能合并分支。Git的冲突。MVCasp.net - I can't merge branches. Conflicts in Git. MVC asp.net

- 此内容更新于:2016-02-03
主题:

我尝试合并分支,但我得到的错误将完成与冲突http://prntscr.com/936x6n(u看到即使gitgui我不能)我试着跳过数据库。所以我加入。gitignore。mdf和。ldf,但仍然什么都没有。我不能合并分支。我应该做什么?

原文:

I'm trying merge my branches, but I get the error merge completed with conflict http://prntscr.com/936x6n (as u see even with git gui i can't)

I tried skip database. So i added to .gitignore .mdf and .ldf, but still nothing. I can't merge branches. What should I do?

网友:你应该直接输出的文本在你的问题,而不是作为一个外部链接到一个图像。

(原文:You should post the text of the output in your question directly, not as a external link to an image.)

网友:编辑,但是它唯一的“将完成与冲突”这就是我为什么贴截图

(原文:Edited, however its only "merge completed with conflict" that's why i pasted screenshot)

解决方案:
如果你想忽略一些文件合并,Git属性为特定的文件可以帮助使用合并策略。这是一个例子,指定文件留在你最初的版本。创造。gitattributes回购和编辑:合并==合并我们的…然后定义一个虚拟的合并策略:git配置全球merge.ours美元。司机真的
原文:

If you want to ignore some files during the merge, Git attributes using merge strategies for specific files could help. Here is an example that the specifies files stay at whatever version you originally had.

  1. create .gitattributes in your repo and edit: merge=ours merge=ours ...

  2. And then define a dummy ours merge strategy with: $ git config --global merge.ours.driver true

网友:AutoMoint/AutoMonitApp_Data/Pojazdy。mdf合并=我们AutoMoint/AutoMonit/App_Data/Pojazdy_log。ldf合并=我们

(原文:AutoMoint/AutoMonit/App_Data/Pojazdy.mdf merge=ours AutoMoint/AutoMonit/App_Data/Pojazdy_log.ldf merge=ours)