idea上傳、下載代碼到github(實用篇)

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章