-
打开git-cmd
-
关闭证书校验:git config --system http.sslverify false
-
git clone + 仓库url
-
cd 到仓库目录下,如BattleCity
-
添加文件或文件夹,如pics/battle-city.gif
-
git add pics/battle-city.gif
-
git commit -m “描述”
-
git push -u origin master,输入用户名+密码
-
等待上传完成,若出现fatal: the remote end hung up unexpectedly为网络原因,重新执行push
-
push时出现:
failed to push some refs to 'https://github.com/Vae1997/BattleCity/' 1
2
3
4
5hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.```为仓库已经更新,本地不是最新的仓库
执行:git pull origin master,拉取最新仓库后接着push
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 许嵩的博客!