- 取消代理
git config --global --unset https.proxy
成功之后运行原代码,会弹出github登录界面
- 更新代码
- 常用’git --help’ ‘git status’(查看git存储状态)
22.3.7遇到的新问题:
fatal: unable to access ‘https://github.com/xxxxx/xxxxxxxxxxxx.git/’: Failed to connect to github.com port 443 after 2050 ms: Couldn’t connect to server
解决:git SSL certificate problem: unable to get local issuer certificate
最终完整解决方案,附带简单讲解:
https://zhuanlan.zhihu.com/p/193140870
4.问题:error: src refspec master does not match any
error: failed to push some refs to ‘github.com:limboless/AtomImgSCNU_TUcamOnly.git’
解决:
$ git push origin master 修改为 $git push origin main即可正常上传
5.创建库+更新库:
在Github上创建库
复制界面上的引导,例如:
echo “# AtomImgSCNU_TUcamOnly_videoON” >> README.md
git init
git add README.md
git commit -m “first commit”
git branch -M main
git remote add origin git@github.com:limboless/AtomImgSCNU_TUcamOnly_videoON.git
git push -u origin main
找到本地文件夹,右键选择Git Bash here
粘贴复制内容
接下来直接进行更新
更新:
git status
git add *
git commit -m “更新说明”
git pull
git push origin main
6.git还原文件到指定版本,git恢复误删文件,git-checkout
原网址:https://www.bilibili.com/video/BV1gR4y1C7SW/?spm_id_from=333.788&vd_source=714c699ee5363c438114b0b3b66b8ee1