This chapter focuses on Git, and also gives a detailed explanation of the source code submission and acquisition.
Before using Git, the first thing you should do is install Git. Common Linux systems have git. If not, you can install the latest version of Git using the following command:
#apt-get Install git
#apt-get Install Git-doc git-svn git-email Git-gui gitk
It is important to note that all of these actions will have to die under root permissions to execute commands.
After installing Git, you can use the Man command to view the help documentation for the specified command directly under Linux. Viewing the specified document as text can be used: #git help <sub-command>. Viewing HTML-formatted documents can be used: #git help–w git-checkout.
Source code refers to the code of the most original program written. Source code submission and acquisition refers to the technology of creating a repository, submitting source code, creating a branch, uploading source code to a remote server, and obtaining source code from a remote server.
To create a repository: Git init. At the beginning of the project, you need to create an empty repository locally using git init.
Commit the file to the local repository: Git commit.
Getting Started with Git