Different Config Files in GitHub Repo Branch

前端 未结 1 493
执念已碎
执念已碎 2021-01-21 17:48

So I have a GitHub repo with a master branch and a staging branch, they both have separate config files for deploying to different places. I was hoping that when I perform a pu

1条回答
  •  伪装坚强ぢ
    2021-01-21 18:15

    You can do this using the ours strategy. Create a file named .gitattributes in your both branches and add the following content in it:

    path/to/your/config.json merge=ours
    

    Then commit your the .gitattributes files:

    git add .
    git commit -m 'Added gitattributes'
    

    0 讨论(0)
提交回复
热议问题