1.显示unable to access ‘https://xxxxgithub"错误时的一种解决方法:重新使用remote add与远程库进行连接,并将其中的https改为git;
2.显示Unknown SSL protocol error in connection to github.com:443错误时的一种解决方法:输入$ git config http.sslVerify "false"
,从而忽略SSL;
3.上传之后merge分支(假设现在欲合并到main分支上)时出现There isn’t anything to compare,表示两个分支(很可能)是独立的分支,无法进行merge,一种解决方法:
①先pull欲合并的分支:
$ git pull origin main--allow-unrelated-histories;
此时会发现本地的文件夹下已经是merge之后的结果,此时在本地git库中已经完成了merge,接下来就提交到远程库即可;
②然后切换分支到欲合并的分支上:
$ git checkout -b main
③最后push到远程库:
$ git push -u origin main