我有我的計算機上的現有代碼,然後我註冊了我的帳戶在sourceforge,啓動一個git項目。現在我需要在sourceforge遠程空間上發送我的本地項目。在SF有指令頁:git致命錯誤路徑與一個沒有意義
第一次使用Git
cd miorep-code
git init
git commit -a -m 'Initial commit'
git remote add origin ssh://****/p/miorep/code
git push origin master
現有的存儲庫
cd miorep-code
git remote add origin ssh://****/p/miorep/code
git push origin master
如果我按照第一指令集,我有一個
"Fatal: Paths with -a does not make sense"
當我得到git commit -a -m 'Initial commit'
。
如果我跟隨第二組指令的獲取:
error: src refspec master does not match any. error: failed to push some refs to 'ssh://**/p/ravenna/code'
,當我執行的是最後一個命令。
在我的情況下,正確的一組指令是什麼?爲什麼我得到那個錯誤?
它似乎需要遠程加載。 – 2012-08-11 15:23:43
是的;我假設你已經做到了。 – larsks 2012-08-11 15:58:24
你的答案似乎不對。 'git commit -a'應該是git add的等價物。 && git commit'。這就是'-a'所做的,不是嗎? – Olhovsky 2013-05-15 22:34:16