很详细的idea配置git github操作 https://www.cnblogs.com/jinjiyese153/p/6796668.html

遇到的坑及解决办法。

1.指定需要操作的github仓库地址

git->repository->Remotes… 设置即可
在这里插入图片描述

2.push代码报错 No such device or address failed to execute prompt script (exit code 1) could not read Username for ‘https://github.com’: No error

在这里插入图片描述
解决办法:

找到对应工程的.git/config文件,修改 config文件,如下图红色地方所示,xxx为你github的用户名(不是邮箱,是用户名),yyy为github的密码

3.配置完后,想将本地代码push到github,第一次提交会出现冲突,

直接使用强制提交 git push origin master --force

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐