很詳細的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