Set up a network in Git for collaborative work

Question:

I want to build a network using git for the repositories, but not locally if not that somehow there is a server and that the other colleagues connected from home make their respective changes. I have a PC that I can use as a server, but it won't be on 24 hours. As if it were on GitHub but in local mode. How can I do that?

Answer:

Git can work like this without other software. There are three protocol options you can use, according to Pro Git :

In your case, the Git protocol may be the most reasonable, because it is part of git, and thus does not require other software.

The Git protocol is a special daemon, which comes bundled with Git. It listens through a dedicated port (9418), and it gives us a service similar to that of the SSH protocol; but without any kind of authentication.

If you want authentication, you can consider using SSH.

The chapter Git on a server , from the Pro Git book, explains how to install git to use the git protocol, and SSH.

It is important to understand that this only serves as a server for Git; it doesn't include the web interface like GitHub. Therefore, there are several options, such as GitLab , GitHub Enterprise , and others. There are also options with simpler web interfaces, like GitWeb , that you can use in conjunction with your Git server. But I cannot make a specific recommendation for these, because the best option for you depends a lot on your case, your budget, and your preferences.

Scroll to Top