1. Download a git software and install it on the Internet
2. Generate SSH
Right-click on the desktop, choose Git Bash here, go to the operator interface, enter "Ssh-keygen-t rsa-b 4096-c" *********@***.com (mailbox at coding.net registration) "" Command.
The next step is to change the new text document name to "Id_rsa", continue with the setup password, and then enter the command "cat ~/id_rsa.pub" to generate the SSH
Open ssh with a text document to get the key, copy the contents, and then in the account settings in the coding.net to paste the contents of the SSH, the other self-setting is good. This completes the configuration.
3. Create a local warehouse
Create a folder locally as your local repository for uploading code, and then configure the repository with the coding server side.
Right click inside this folder and choose Git Bash here, first initialize the local repository and enter "Git init".
Then open coding.net the address of the code warehouse that you created inside the copy, enter in git the command "Git clone + warehouse address (right mouse paste)", Example: http://*******
This will be the coding.net in the code in the repository of everything in the clone in your computer (note: see if you can use the CD to enter another disk, or the default clone on the desktop)
4. Code push
Put the files that you need to upload into the cloned folder, and then check the Repository status command "Git status" by using commands in Git to enter the folder.
If the file is not on the coding.net, the font will appear red, with the command "git Add." Select all uploaded files.
After completing the above steps, enter the command "Git commit-m" to identify what the file comment is "",
Then enter the "Git Push Origin Master" command to push to the cloud, origin is the server, master is the branch.
5. Code download
Once you have cloned the previous data, and someone else uploads some new files, you can use the command "Git pull Origin master" to update the latest repositories.
How do I use git to upload code to the coding code repository?