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.