Distributed Version Control System
Simply speaking ,it helps to record every change in files and make it possiable for a group of people woking together on one file.
Differences between a centralized version control system and a distributed version control system.The biggest problem of a centralized version control system is that it needs network connections.Version libraries are centralized on central servers.Before modifing the files, the newest version should be downloaded.Distributed version do not have a central server.Every single computer is a version libraries.
Ubuntu 18.04 installing git
1 |
sudo apt-get install git |
Windows installing git
It could be downloaded from official website
Repository
All files in repository could be administrated by git.
Steps on creating a version library
1 |
$mkdir rockets |
1 |
$git init |
Use this step to change this directory into a repository which could be administrated by git.It tells that an empty repository has been created.
Now create a file named first.txt ,add some words in it,like this:
1 |
Git is a version contral system. |
Ways to add a file to a repository
1 |
$git add first.txt |
1 |
$git commit -m"wrote a first file" |
近期评论