Git repository setup for a project that has a server and client

后端 未结 2 948
遥遥无期
遥遥无期 2021-02-07 18:39

I am part of a project that is starting up that will have a client executable and a server executable. We are using git to help keep our team updated with code and this is the f

2条回答
  •  一生所求
    2021-02-07 19:26

    If the clients and servers are fairly independent one from another, they are good candidate for being in their own git repo. This is the component approach.

    You could have three repos:

    • client
    • server
    • networking (common modules)

    The submobules in Git are neat to record the exact SHA1 you are using together for your system.
    So you could define 2 parents repo:

    • client app

      • client
      • networking
    • server app

      • server
      • networking

    The idea being to be able to say if the client and the server are using the same or a different version of the networking.

    The all setup might be an overkill for a class project, but could illustrate the difference between the system approach (everything in one giant repo), and the component approach.

    Separating in different git repo allows for independent tagging and branching.

提交回复
热议问题