git use, in Ubuntu

Source: Internet
Author: User
Tags git clone


#安装
sudo apt install git
Have to build an account on the GitHub website first.
#配置 your github.
git config--global user.name "Fanbrightup"//Is your user name in GitHub git config--global user.email "[Email protected]"
(You can skip these two steps and you can't use them now)
View configuration informationgit config--list
Edit configuration Information gedit ~/.gitconfig

#创建公钥

Ssh-keygen-c ' [email protected] '-t RSA
Will let you choose some location, in the prompt message when the direct return to the good, cover the original, enter three times it

This establishes the corresponding key file under the user directory ~/.ssh/

#上传公钥

In the Github.com interface, select the Settings with the downward arrow next to the Avatar in the top right corner, then select SSH and GPG keys and select New Add.

Title can be arbitrarily named (my ubuntu16.04), the content of Key is copied from the content of ~/.ssh/id_rsa.pub, after completion, you can use

ssh-v [email protected]

To test. See the following information to indicate that the validation was successful.

...

Exit Status 1

#git常规简单的使用git clone plus an address to select the SSH address, can be more convenient to save passwords, establish a local software warehouse
Commit files in git use git Add file name (newly added) or write in the Warehouse folder. That is, add all git commit-m "message to add"//will be linked with the file submitted, it is convenient for git push to submit to the remote git checkout filename can restore the locally deleted files

git use, in Ubuntu

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.