github的注册和使用

注册

 

创建一个自己的库

 

 

下载安装包

 

 

成功创建密钥

 

 

在github个人主页点击“setting–SSH and GPG keys–New SSH key”,点击添加

 

 

 

命令行的上传方式

1.进入本地的项目目录,右键“Git Bash here”,调出git命令行界面,然后输入 git init

2.将目录下的所有文件上传,也可以将“.”换成具体的文件名 git add .

3.将项目提交到gitHub git commit -m "注释语句"

4.在github上创建新的repository

 

5.点击 “Create repository”跳转到一个连接,如下红色圈获取到本项目的github地址

 

6.将本地的代码关联到github上 git remote add origin 项目的github地址

7.上传代码到github之前需要先pull git pull origin master

8.上传代码到远程仓库 git push -u origin master

 

从github上下载代码

1.先在项目处点击 Clone or download 弹出

 

2、打开git,进入要存放该项目代码的git目录

3、输入:git clone git://github.com/hanying/test.git(git clone https://github.com/hanying/test.git),其中git cone git 和git clone https一样

 

posted on 2019-05-20 15:38  一起喝奶茶吧  阅读(332)  评论(0)    收藏  举报