首页 > 代码库 > github项目配置

github项目配置

 

 

准备工作:

下载一个git:  https://git-scm.com/downloads

1.登陆到github

登陆地址:https://github.com/login

技术分享

2.创建新项目

技术分享

技术分享

 

3.配置ssh key

技术分享

技术分享

 技术分享

title随便填写,key留着先不填,页面保留

 

 运行本地的git:

$ ssh-keygen -t rsa -C "your_email@youremail.com"

技术分享

一路enter键入,这样在 /c/users/你的用户名/.ssh/下生成三个文件

技术分享

用记事本打开id_rsa.pub 复制其中的内容,然后打开github,粘贴到刚刚保留的页面的key的框里,空格和换行都保留

技术分享

检测ssh key

$ ssh -T git@github.com

技术分享

4.从github上面拉包并提交

找到你刚刚创建的那个项目

技术分享

 

复制下来后,在本地建一个项目文件夹,然后运行git bash

$ git clone git@github.com:*****/reactDemo.git

 技术分享

之后 进入该目录添加一个test.txt文件,测试下上传

$ git add --all
$ git commit -m "first commit"
$ git push

 

 技术分享

 

上传成功

 

github项目配置