github application

1. Register a user at https://github.com Note (do not use 163 mailbox, because my mailbox cannot receive the verification email, I use Sina mailbox personally)

2. Install git apt-get install git under ubuntu. After the installation is complete, git config --global user.name "git login name";git config --global user.email "git login mailbox";

3. Create a repository cd/usr; mkdir zx_git; cd zx_git; git init; vim readme.txt; just write something in readme.txt; git add readme.txt; git commit -m "push readme.txt"(- After the m is a comment);

Fourth, install the ssh protocol apt-get install ssh  

5. Configure SSh Key ssh-keygen -t rsa -C "your [email protected]"

6. cd ~ ; ll -all; cd .ssh; ls; There are two files id_rsa, id_rsa.pub, copy the content of id_rsa.pub

7. Enter the git website, drop down the icon in the upper right corner to select Settings, then select SSH Keys, select Add SSH KEY title, the random key is what you copied, and then save (as shown in the figure below)

8. The penultimate drop-down in the upper right corner selects the first New RepositoryCreate a repository

9. Go to your repository directory under your ubuntu system and execute git remote add origin [email protected]: "your git login name"/learngit.git

10. git push -u origin master (-u must be used for the first time, and will not be used in the future) and then you can see your local things on the git page (the picture below indicates that the push is successful)

 11. From now on, As long as the commit is made locally, you can pass the command git push origin master

 

 

Attached:

Use git to upload a folder, the folder cannot be empty

git delete folder git rm -r --cached "folder name"

git commit -m "delete file"

git push origin master (the folder of the remote warehouse is also deleted)

 


 I just took some study notes. If you want to see a better and clearer git study log, you can go to Liao Xuefeng's website, link (http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326854685&siteId=291194637