What is the best way to organize multiple projects when using git

前端 未结 3 836
慢半拍i
慢半拍i 2021-02-07 02:25

I have 5-10 independent projects that I want place under version control using Git. What is the best way to organize the projects/respositories:

  • Use one reposito
3条回答
  •  佛祖请我去吃肉
    2021-02-07 03:11

    To complete Marc's answer, going with one central repository (with all the projects inside) does not prevent multiple repositories, each with their own project.

    Let's hear it from Linus himself:

    There are no real issues either way, and perhaps more importantly, it's not even something you have to decide on day one.

    You can easily do it one way or the other, and either

    • switch around as needed
    • or even mix the two approaches where it makes sense.

    For example, it may be entirely sensible to have the common "distribution points" use a single shared repository that contains all modules as separate branches within the same repository.

    But even though such a central distribution point repository is set up that way, individual developers may well decide that they are happier having separate repositories for different modules. The two approaches are not mutually incompatible, and you can fetch data and push it back out between both different kinds of repositories.

提交回复
热议问题