Code Management Essentials-----git using the upload code cloud

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.