方法一:選擇菜單VCS—Import into Version Control — Share project on Github,填寫(xiě)倉(cāng)庫(kù)名和github賬戶(hù)之后,點(diǎn)擊”Share”按鈕即可。如下圖

方法二:在本地的項(xiàng)目文件上右鍵,選擇“Git Bash Here”,彈出框中輸入命令。如下圖三。如果pull或push失敗,則git branch --set-upstream master origin/master,或者在Idea的項(xiàng)目右鍵,選擇Git -> Repository -> Branches -> origin/master -> Checkout as new local branch。

網(wǎng)友評(píng)論