在github上面新建一个仓库
复制仓库地址后续写命令时需要使用
找到自己想要上传的文件
右键点击Git Bush Here进入页面
输入
git clone https://github.com/laiba345/bilibili.git
后面地址就是上面自己新建的仓库地址
报错的话,使用国内镜像即可
npm config set registry https://registry.npm.taobao.org
打开本次文件 发现多了一个新文件夹
输入命令 - 进入该文件夹
cd bilibili
输入命令 - 添加bilibili文件夹下面的所有文件 (点前面有空格)
git add .
提交信息
git commit -m “first commit”:提交信息。(注:“first commit”里面换成你需要的描述,如“第一次提交”)
git commit -m "first commit"
git push -u origin master :把本地仓库push到github上面。(注:此步骤需要你输入帐号和密码进行登录)
注意
git push -u origin master
- 报错(看下一行)
- 现在有可能改成了main,不是master了,具体看是啥
输入下面会弹出窗口,根据窗口进行登录即可,实现文件长传到github上面