2012-12-24 41 views
0

我想我的本地機器上添加第二個本地回購。所以,我創建了一個目錄,提出了git init那裏,然後我跑:git remote add new_repo /path/.git混帳推到本地

然後從我的本地回購,我跑git push -u mybranch,知道它是從我推在我的工作分支,然後我得到的錯誤:

No refs in common and none specified; doing nothing. 
Perhaps you should specify a branch such as 'master'. 

我的成功如何才能把我的東西在第二回購?

回答

4

你必須告訴它哪裏推。 git push -u new_repo mybranchmybranch本地推mybranchnew_repo(並設置跟蹤,以便將來,git push將默認推mybranchnew_repo)。

+0

非常感謝! – user1611830

1

的Git只是不知道什麼推 - 告訴它:

git push new_repo mybranch:mybranch