recherche

Maison  >  Questions et réponses  >  le corps du texte

在使用git的时候,当我在文件合并时,.gitattributes 中设置忽略部分文件不合并,但似乎并没有效果

比如我现在有两个分支,分别是masterdevelop
按照官方的说法,在.gitattributes文件中如下设置

database.xml merge=ours

两个分支中都有database.xml文件,但是内容不同,我不想在master合并develop分支的时候,把database.xml也合并了。

当我修改了develop分支中的database.xml,切换到master分支进行合并

git merge develop

结果依旧会产生冲突。这是为什么?关于merge=ours说明的链接如下:
http://git-scm.com/book/zh/v1/%E8%87%AA%E5%AE%9A%E4%B9%89-Git-Git%E5%B...

習慣沉默習慣沉默2879 Il y a quelques jours648

répondre à tous(1)je répondrai

  • 大家讲道理

    大家讲道理2017-05-02 09:23:16

    Vous devez également définir les paramètres suivants :

    git config --global merge.ours.driver true
    

    répondre
    0
  • Annulerrépondre