从git上拉代码
- 本地创建了文件夹,然后打开 git bash here
- git init ( 把当前目录初始化为仓库)
- git clone -b branchname 地址
修改文件…
在IDEA里,,测试,可以成功打包
开始提交代码到git
- git branch ffm_emr_0909 创建分支,如果已经有该分支,也可以是切换到该分支:git checkout/switch ffm_emr_0909
- 查看当前分支:get branch, 不要用git branch –a(:q退出),会出特别多
- IDEA里的代码commit,添加commit message
- git push(新分支第一次push,可能要用:git push --set-upstream origin ffm_emr_0909)
报错: push failed
问题描述:pycharm里commit成功,但是push failed,多次尝试均失败
11:07 Push failed: Unable to access 'https://github.com/XXX.git/': OpenSSL SSL_read: Connection was reset, errno 10054
11:08 Push failed: Unable to access 'https://github.com/XXX.git/': Failed to connect to github.com port 443: Timed out
11:09 Push failed: Unable to access 'https://github.com/XXX.git/': Failed to connect to github.com port 443: Timed out
失败:刚开始以为是要上传的文件太大了,所以尝试把变量设置大,但仍然失败
解决方法:
参考:https://blog.csdn.net/u012845311/article/details/65630244
在Settring -> VersionControl->GitHub中去掉:“Clone git repositories using ssh”即可
,
PS: 我的解决方法:(我的这个设置,本来就没勾选)
- 先勾选上,apply, ok, 尝试push, 失败
- 再去掉勾选, apply, ok, 尝试push, 成功