這不是Import an existing Git repository into IntelliJ IDEA的副本,因為我正在嘗試將現有的非空專案連接到現有的非空存盤庫。標題說明了一切,有什么想法嗎?
uj5u.com熱心網友回復:
在切換到 Git 之前先在命令列中嘗試。
cd /path/to/local/repository
git remote add origin https://url/existing/remote/repository
git fetch
git log --decorate --oneline --graph --all --branches
如果您看到 origin/main 和本地主分支的歷史記錄相同,則說明您擁有正確的遠程存盤庫。
然后打開 IntelliJ IDEA,它應該會檢測到新添加的遠程origin參考。
(檢查 VCS -> Git -> Remotes)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/488207.html
