2016-11-21 106 views
2

我正在將我的修補程序分支從Mercurial遷移到Git。我使用hg-git插件將我的修補程序分支導入到我的git項目的分叉回購中的新分支中。有沒有辦法將新創建的分支添加到上游回購?該分支目前不存在於上游回購倉庫中。如何添加一個分支,創建一個分叉回購,上游回購?

我試圖運行...

git push u [email protected]<name of upstream repo>.git hotfix 

,但得到的錯誤....

error: src refspec [email protected]<name of upstream repo> does not match any 
error: failed to push some refs to 'u' 

回答

1

您應該使用-u而不是u。你可以試試這個命令:git push -u origin hotfix

說明:原點是遠程的默認短名。您可以使用git remote -v來檢查您的遠程短名稱是來源還是其他。