I want to set up a network using git for the repositories, but not locally, but in some way there is a server and 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?
Git can work like this without other software. There are three choices of protocols you can use, according to Pro Git :
In your case, the Git protocol may be the most reasonable, because it's part of git, and thus doesn't require any other software.
If you want authentication, you can consider using SSH.
The Git on a Server chapter of the Pro Git book explains how to install git to use the git protocol, and SSH.
It's important to understand that this only serves as a server for Git; it does not include the web interface like GitHub. For that, there are several options, such as GitLab , GitHub Enterprise , and others. There are also options with simpler web interfaces, such as GitWeb , which 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.
You can see Gitblit , it is a repository server developed in java, so it can be used on windows, linux and mac (even others) it also has a WAR version, which can be deployed in a Java application container.
It really is easy to set up and use, and has the basic features that everyone needs.
You can see a demo here
Translation of the installation of the GO version
Translation of the WAR version
Note 1: Glassfish or Apache Tomcat should work as a container, you can see its installation in the following tutorials:
Dear you can use Gitolite
Advantage
Disadvantages
For more information http://gitolite.com/gitolite/index.html .