我有一個基於java的動態web項目在eclipse中放置在源代碼控制git下。 我想上傳這個項目到bitbucket中的倉庫。要做到這一點,我使用的命令 下面 -Git錯誤: - 所有不能與refspecs
git remote add origin https://[email protected]/myself/affablebean.git
git push -u origin --all # pushes up the repo and its refs for the first time
第二個命令給我一個錯誤。請告訴我爲什麼會發生這種情況,我該如何解決這個問題。
error: --all can't be combined with refspecs
usage: git push [<options>] [<repository> [<refspec>...]]
-v, --verbose be more verbose
-q, --quiet be more quiet.................
-u, --set-upstream set upstream for git pull/status
...........................
我試過'git push -all origin',而整個項目似乎都上傳了。我不確定這個 是否是正確的做事方式。 – james
不,git push -u origin master'更好:請參閱下面我的答案中提到的鏈接。 – VonC
兩者都很好,取決於你想要做什麼。如果你想「上傳(一)項目」,我會說 - 所有的路要走。 –