您现在的位置:首页 >> 前端 >> 内容

github上传代码操作步骤介绍

时间:2018/5/11 11:25:11 点击:

  核心提示:1、github使用邮箱注册用户名密码,然后填写项目name,点击create。这时会生成github项目地址然后官网下载git安装,具体请看git安装教程首次上传得要还需要配置ssh key右键gi...

1、github使用邮箱注册用户名密码,然后

github上传代码操作步骤介绍

填写项目name,点击create。这时会生成github项目地址

然后官网下载git安装,具体请看git安装教程

首次上传得要还需要配置ssh key

右键git bash here

$ ssh-keygen -t rsa -C "youremai@com"

$ ssh -T git@github.com /验证是否成功

然后打开c盘C:\Users\Administrator会看到.ssh文件夹,打开id_rsa复制keyvalue

然后打开github个人主页-》setting->GGH and GPG key 复制进去

然后打开需要上传的项目目录右击git bash here

$git init

$ git remote add origin git@github.com:yourName/yourItem.git /yourName:github用户名 yourItem.git:刚创建的项目git地址

$git add README /添加文件名 如果是添加所有文件则是 $ git add .

$ git commit -m "first commit" /查看刚才提交的文件

$ git push origin master

到此则完成上传

github上传代码操作步骤介绍

报错可以执行一下命令然后重新上传

$ git remote add origin https://github.com/cleanRank/vueapp.git /删除

Tags:GI IT TH HU 
作者:网络 来源:Miss739999