Sharing files across branches in Git

后端 未结 6 1743

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 05:56

    For simple systems, I'll create base versions of these files that are in version control that are then adapted for each instance, the files for which are in .gitignore.

    If I'm using a more sophisticated tool chain, I'll create source XML files that describe the base pieces, XML files that describe the specific instance variations then run an XSLT using a profile or command line property to generate the locally appropriate versions as part of the build configuration/script depending on your poison. This doesn't have to be XML/XSL, I just deal in XML a lot, you could use any kind of munging system that works with your build environment, say text files with perl scripts or just sed/awk.

提交回复
热议问题