Git tutorial-cloning from a remote library

Source: Internet
Author: User

The last time we talked about a local library, and then a remote library, how to associate the remote library.

Now, assuming that we are developing from scratch, the best way is to first create a remote library and then clone from the remote library.

First, log on to GitHub and create a new repository named gitskills :

We tick Initialize this repository with a README , so GitHub will automatically create a file for us README.md . Once created, you can see the README.md file:

Now that the remote library is ready, the next step is to git clone clone a local library with a command:

 $ git clone git @github.  Com:michaelliao/gitskills.gitcloning into  ' Gitskills ' ... remote: counting objects: 3 , done. remote: total 3 (Delta 0), Reused 0 (Delta 0) receiving  Objects: 100% (3/3), Done. $ cd gitskills$ lsreadme.md       

Be careful to replace the GIT repository's address with your own, then go to the gitskills directory and look at the README.md file.

If there is more than one person collaborating on the development, then each individual from the remote clone a copy can be.

You may also notice that GitHub gives more than one address and can also use such an https://github.com/michaelliao/gitskills.git address. In fact, GIT supports a variety of protocols, git:// using SSH by default, but can also use https other protocols.

With the https exception of slow speed, one of the biggest problems is that each push must enter a password, but in some companies that only open HTTP ports, the protocol cannot be used ssh https .

Summary

To clone a warehouse, you must first know the address of the warehouse and then use the git clone command clone.

GIT supports a variety of protocols, including https , but with the fastest ssh supported native git protocols.

Git tutorial-cloning from a remote library

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.