Do project for the first time to use Git, not used before, completely did not understand, pondering the long to make almost, hereby share, you can go a little detour.
This time, the operating system is mint.
1. First you need to install Git
sudo apt-get install git
2. Create a new Git repository locally
Create a repository by creating a new folder and then opening the terminal in the folder and entering the command git init
3. Connect to a GIT server
The server we used this time is http://git.oschina.net.
Enter the command git remote add Origin <server>, replace <server> with the project address on Git.oschina.net
Git.oschina.net provides two kinds of connection methods, HTTPS connection and SSH connection, this time first introduced the HTTPS connection method, that is, the use of the address such as Https://git.oschina.net/xxxxx
4. Get the project branch
Use the command Git pull Origin master to get the project on the remote server (a bit different from clone)
You need to enter the user (mailbox) and password registered on git.oschina.net.
5. Modify the Content
6. Declaring the user (seemingly only entered at the first time, not later)
Use the command git config--global user.email "[Email protected]"
7. Submit Changes
Use the command git add * to commit all changes to the cache (local), waiting to be sent
Use the command git commit-m "Modify information" to submit the changes to head (local) and describe what modifications were made
8. Commit changes to the remote server
Use the command git to push Origin master, and then enter the user name and password (provided the project owner allows the submission)
You will then be able to see your submission on the server. Beginner's experience, if there is a mistake, also hope to enlighten
Git uses basic methods (get branch from remote server, commit changes)