| Guide |
Using the Linux operating system, I had to mention Git version manager, this Linus took two weeks to develop the Distributed version Manager (this is the great God, the first film a worship ...) There is no doubt that the Git version manager is born with the same lineage as the Linux system, so its performance on Linux is a duck to the top. |
So the best way to manage documents, programs, and source files on Linux is Git, and git is distributed so that you can manage the local version without having to communicate with the hub server. However, for a small team working together, local versioning alone is not enough, and the team's version must be consistent through information interaction to ensure that the team is in the same direction. And the simplest way is to build a local area network server. The following is a small LAN server I built on the Ubuntu16.04, in the LAN for the team's program source version management, software development on the virtual windows on it, after testing, the server was built, regardless of Ubuntu or Windows can be normal version management.
The following describes the construction process:
Update Apt-get
Sudo apt-get Update
Install git (some versions are installed by default)
Sudo apt-get Install git
Then, when asked, enter "Y" and return
Create a git administrator account
sudo adduser git
Then enter the user's password and confirm the password again, the rest of the options are entered by default
Create a warehouse
Go to the SRV folder and select the "Open at Terminal" option in the right-click menu
Initializing the Warehouse
Sudo git init--bare myproject.git
(Here are two-)
After the command finishes, the following files are created within Myproject.git
under the SRV directory, change the ownership of the Myproject.git
sudo chown-r git:git myproject.git
At this point, a local area network git server without permission limits is built.
Validation
Under Hone, start the command terminal, enter "sudo git clone [email Protected]:/srv/myproject.git", where the IP address is Ubuntu IP address
Enter, and a myproject.git empty folder will appear under home.
If you do not succeed in cloning, the following conditions occur
Then you need to install SSH on Ubuntu
Enter the following command:
sudo apt-get installopenssh-client
I usually work under Windows, so I'll use Windows to verify that the server is available.
First install git, Baidu search Download application, and then install (all by default)
After that, right-click inside a folder and select "Git Bash here"
Enter "sudo git clone [email protected]:/srv/myproject.git" to
Enter "Yes"
You can then use GIT commands to manage files and programs.
Ubuntu16.04 the most efficient small LAN git server