2013-12-09 39 views
0

我想別名一個推命令,所以我不必一直鍵入我的分支名稱,我在這一步停滯:
Git push new local branch to remote, without having to specify nameGit推新分支沒有指定遠程名稱給refspec錯誤

該命令不適用於我。我得到:

$ git push origin -u head 

error: src refspec head does not match any. 
error: failed to push some refs to '[email protected]:hurtstotouchfire/repo.git' 

這個分支被克隆到回購,然後使用git checkout -b創建新的分支,使得提交創建的,然後上面的push命令。有沒有必要使用此命令的配置?

回答

1
git push origin -u HEAD 

HEAD是一個有效的參考,head不是。

相關問題