As a programmer, you have to learn the management of code, this is a basic accomplishment, like a swordsman's sword spectrum, code management, the current popular is SVN and git, but very bad is git if there is no plug-in, many people do not use Git bash to implement their own code management, and constantly try, Today finally summed up a very good method for you to refer to the swordsman, looking ye use, from the daily back and forth the hard fate of the computer.
1. Download git
Here are the system configuration: Windows look here: Windows git
2. Install git
Choose your own installation path or default.
3. Configure Git
Add SSH to your GitHub account
$ ssh-keygen-t rsa-c "email address"
All the way back, after the final success, locate the generated. SSH folder under the Command Window path, go in and open the file id_rsa.pub, copy all
I am the default path in the C drive, after you change the path, finally look at your own command window to find it.
Go to git account Add, click Avatar, select Personal information to modify, then select SSH Public key
After pasting, go back to the command window
4. Verify that it is successful
$ ssh git @github. com
5. Configure Git's global name and nickname
git config--global user.name "user name"
git config--global user.email "email address"
6. Create a local warehouse
Create a new folder in the local store code directory and right-click Git bash here
Git init initializes the GIT repository
7. Writing a Help file
Touch readme.md (Create Help file)
git add readme.md (add Help file)
git commit-m "Comment content" (add comment)
8. Connecting to a remote repository
git remote add orgin "Your Remote Repository address" (remember to add. git after copying the link)
9. Start uploading code to the code cloud
Copy the file you want to upload to this file.
git add "Copy Folder"
Git commit-m "Add comments to Files"
Git push-u origin master uploads files to the code cloud if it fails as follows
Please use Git push-u origin master-f
Back to the code cloud you can see the uploaded files.
Code Management Essentials-----git using the upload code cloud