Sharing files across branches in Git

后端 未结 6 1748

There are a bunch of files in my project that are sometimes modified but always shared among many different branches. Examples include build scripts, batch files that include p

6条回答
  •  攒了一身酷
    2021-02-07 06:08

    I would create one branch to include all these shared files. Whenever a branch needs a shared file, it can get it using

    git checkout workingbranch
    git checkout sharedbranch 
    

    Later you can update simply using the same command

    git checkout sharedbranch 
    

提交回复
热议问题