I’m making a game that will function as a web app, and I have some server code, and some client code. Both of these are in their own, separate directories, and then they’re wrapped up into a git directory, which is pushed to Github. Does this way of doing things have any flaws, and should I create separate git directories for the same project?
Share
If by “git directory” you mean a single git-controlled tree of subdirectories, yes that’s fine. Certainly do not use separate git repositories for the client and the server, otherwise you will have to design a scheme for checking protocol-version consistency when a client connects to a server (though you may have other reasons to need to support this, for example any time the client and server are pacakged or deployed separately you would need to do this).
However, if you actually mean filesystem directory, I would advise not. Create a subdirectory for the definitions (header files normally) that the client and server would need to share, and keep the client code and server code in two other separate directories. Unless they’re very trivial and there will always in total be a tiny amount of code.