Upload the items on your Mac to Oschina for code Hosting.

Source: Internet
Author: User
Tags hosting

1. First look at whether you have a public key, in my profile-->ssh public key view, if not, add your own SSH public key:

SSH key allows you to establish a secure encrypted connection between your PC and the Git @ OSC.

2. If there is no public key. You can generate Sshkey $ by following the command below.ssh-keygen -t rsa -C "[email protected]xxxxx.com"

If there is a public key. View your public key $ cat ~/.ssh/id_rsa.pub

then add the pubic yin to Oschina above, add, in terminal (Terminal) enter $ ssh-t [email protected]

If you return Welcome to [email protected], yourname! It proves that the addition was Successful.

3. Switch the directory to the folder where your project is located, for example, if you have a project demo, you can switch to .../demo directory

4. Run the command git init. Note that there is a point behind

5. Run the command git pull [email protected]:xxxx/demo.git

6. Run the command git Add-a. Note that there is a point behind

7. Run the command git commit-am "instructions for the code"

8. Run the command git push [email protected]:xxxxxxx/demo.git Master

finally, the progress, upload speed, done, to prove the success of the UPLOAD.

Upload the items on your Mac to Oschina for code Hosting.

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.