Learn to use github management

Currently: Installed git, github has been created in a warehouse

 First, the basic use of previously run git react items downloaded from github demo

1. Open the desktop, right-click on Git Bash Here, start git management

 2. Use the command git git --help View

 

3. git clone local code from github

git clone under the code you want to address

Such as:

 Second, use git and github management code

 1. Click Git Bash

 2. Enter the command line Page

 3. Configure git

a) to enter ssh-keygen -t rsa -C "email address", note that there is no space between the ssh-keygen, there is a space between the other

 

b) after a carriage return, a line will appear, allowing you to enter a place to save the key, inside the brackets is it the default location, where the content will let you enter a few times, do not enter, you can directly enter, you can see As shown to the effect (here are not the best input directly enter, the first time I changed the save path, it is a problem, one less file):

 

Web site to configure the look ssh key, click on the triangle icon indicated by the arrow, select Settings, then click on the left side of SSH Keys, then click on the right side of the Add SSH Key, this will add SSH Key window appears, fill in the Title this column a name at random from the name, and then open the file id_rsa.pub earlier generation, Select All to copy the contents inside Key to this column, click the Add Key button to complete the operation, then fill your mailbox will receive a confirmation e-mail, do not ignore it

 

 e) verify whether the setting is successful, the following command input git bash:

ssh –T [email protected]

 

If you are a first time, will let you enter yes or no, then enter yes on it, and my other display this is the same. If you are not content appears, there may be displayed permissions problem or something, it should be the kind of situation I mentioned above, if you look at the operation when you generate the key is correct, if there are files in this directory that known_hosts

f)  现在配置一下用户名和邮箱:

git config –global user.name “用户名”

git config –global user.email “邮箱”

 

4.到现在为止,我们就算把Git和github配置完了,现在就来托管我们的项目吧,刚才我们已经在github上面创建了一个叫demo的仓库,那么我们现在就在本地创建一个目录,来管理这个仓库。

5.随意创建一个文件夹,然后鼠标单击右键,使用Git Bash Here打开git

 

输入 git init,来完成初始化工作。这时候目录里面就多了一个.git的目录了。

Guess you like

Origin www.cnblogs.com/glmkeep/p/10987793.html