Linux git basic usage summary <2>

Source: Internet
Author: User

Remote library push and clone

SSH key generated under 1.Linux

Command line Input ssh-keygen-t rsa-c "your email"

A. SSH directory is generated in the home directory, and the id_rsa.pub is your SSH key key.

Under Login github, click Account Settings, SSH key, add SSH key to add your key

At this point, you are binding the two, and you can push the version to GitHub under Linux.

(Note: The code on GitHub can be seen by others, unless you pay for it, etc.)

2. Push your code to GitHub for synchronization

Create a new warehouse on GitHub, such as the name test

At this point you can associate the repository with Linux and push it to GitHub for synchronization

git remote add origin [email protected]: "Your name"/test.git//local add an origin associated with test on GitHub

Git push-u Origin master//first time plus-u pushes the Master branch out via origin to GitHub's test

Now you've pushed your version to GitHub.

Push the origin master directly with GIT (origin can be changed to something else)

3. Cloning a warehouse

For example, if you want to clone your test repository,

command line input git clone [email protected]: "Your name "/test.git can

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.