Environment: centos7.2; Tools: Xshell
1, install git, the command is as follows:
#Yuminstall git
2, set the user name and mailbox, the command is as follows:
' User name ' ' email '
3. Initialize (in the folder where you want to put the project code), the command is as follows:
#git Init
4, connect the remote project address, the command is as follows:
#git Remote Add origin https://gitee.com/xxxxxxx.git
5, pull the code, the command is as follows:
#git Pull Origin Master
Of course it can be another branch.
You will be prompted for a user name and password (you can configure the utility SSH mode so that you do not need to enter your username and password each time).
6, modify the code, file, you can use the following command to view:
#git status
7, after modifying the code, submit, command as follows:
' Submission Instructions ' . #git Push Origin Master
git Add. The following point indicates that all newly added files are submitted, or the specific file name can be specified.
Using Git to manage code under Linux