2012-12-24 78 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