如果设置了ssh,可能会报错,fatal: unable to access 'https://github.com/wuyaojun108/storage-code.git/': OpenSSL SSL_read: Connection was reset, errno 10054。这是服务器的SSL证书没有经过第三方机构的签订,所以报错。实验命令:git config --global http.sslVerify "false",取消ssl校验,可以解决这个题目。
根据管理器:点击左下角的win图标,输入根据管理器,然后打开
切换分支时报错
切换分支:git checkout -b <当地分支名> origin/<远程分支名>
报错:fatal:‘xxx’ is not a commit and a branch ‘xxx’ cannot be created from it
缘故原由:因为远程新建的分支没有更新到当地,用checkout命令是从当地仓库找分支的,当地仓库只有在举行网络请求时才会跟远程仓库交互,应该先实验git fatch命令
在IDEA中使用git
设置git和github
设置git:file - settings - version control - git,在 path to git executable 对话框中,选择 git.exe 地点的路径
设置github:file - settings - version control - github,重要是设置仓库地址和github账号,点击 + 号,选择 log in with token,点击 generate,登录github,生成 token,复制到IDEA中,点击add account
使用经验