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

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 first time for many of us using git (This project is for a class). I am starting to setup the git repository for my project to use but I am not sure what would be the best design for having client and server code.

So onto the question, how should the repository be setup? There will not be a lot of code sharing between the two except for networking. However we are seeing the networking between the two as the most important aspect and want to keep both using the same networking concepts. I’ve done some research into the top and I see possibilities, two separate repositories where we will have to ensure both codes are compatible with each other, or do we use a single repository?

I’m sorry for the fairly new approach for this, I’ve read “Git Pro” but haven’t had too much experience yet with using git for project working with multiple people.

  • Mechanism behind packed files
  • Github for Windows gui + Eclipse
  • Is it useful to track files with Git if not about to commit them?
  • git how to clean a cloned repository and reclone
  • how to trigger build in jenkins when changes committed to submodule?
  • Is it possible to clone a private GitHub repo using passport Oauth2 creds?
  • Why is there a “bubble” in my log graph with no associated commit?
  • How do I get my iTerm prompt to display differently when I'm in a Git branch?
  • 2 Solutions collect form web for “Git repository setup for a project that has a server and client”

    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.

    You should use a single repository, because it can hold multiple projects/solutions/anything else that builds an executable.

    In general, I would organize it the same way that you would like to have it organized locally. There is no reason to deviate from what works for you to accommodate git.

    I would suggest setting up a github repository that all parties may access.

    Git Baby is a git and github fan, let's start git clone.