working with GIT and multiple projects

后端 未结 4 1088
予麋鹿
予麋鹿 2021-01-20 00:58

I have a core set of files I use for almost every project, but each project also has its own unique files too. When i work on one project i sometime update these core files

相关标签:
4条回答
  • 2021-01-20 01:13

    hmm... tough one maybe use a symlink?

    Could you change the structure in which those shared items are in a shared repo and that is checked out on its own. This way, you ideally have 3 repos for 2 projects as example.

    1 master 2 branch 3 shared

    Using an MVC always helps with this at gitgo.. ;)

    0 讨论(0)
  • 2021-01-20 01:19

    One possibility is that you put your core routines in a repository called "core" or something like that and then add that as a submodule to all your other projects.

    0 讨论(0)
  • 2021-01-20 01:25

    Check out git submodules.

    (Har! No pun intended.)

    0 讨论(0)
  • 2021-01-20 01:26

    branches in git are probably not the best solution for your problem, but submodules are! but you need a repository for each project, plus a repository for your core files/libs.

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