解决Pycharm中git/github配置等问题
1.连接git及github账号
首先右键file,选择setting
进入version control点击,会看到右面的Directory
此时可以进行git配置操作
点击github进入github账号配置
输入完账号密码后,点击test,会出现账号配置成功与否的提示
2.github仓库的创建及提交
点击VSC——ImportintoVersionControl——ShareProjectonGithub
然后会弹出框输入仓库名
然后会弹出让你选择哪些文件需要被同步,选好后,在下面的commitMessage可以输入自己的信息,然后点OK,你的代码就提交到网上了。
3.创建及修改文件后提交
对修改后的文件或目录点击右键:Git——Add,先把文件放入暂存区
点击add及commitfile
填好commit的信息后,点击下面的commit and push,可以直接提交到网上
4.Successfully created project '' on GitHub, but initial push failed: Could not read from remote问题解决方案
在提交过程中可能会出现如下错误信息:
Can’t finishGitHub sharing process
Successfully created project ‘XXXX’ on GitHub, but initial push failed:
Could not read from remote repository.
解决方法:
在Settring -> VersionControl->GitHub中去掉:“Clone git repositories using ssh”即可