git子树推送出现"不合格的目的地"错误

oco*_*lot 6 git heroku

我刚刚创建了一个新的Heroku应用程序,我无法将backend我的repo(分支staging)的子树文件夹推送到新创建的应用程序myapp-staging(还没有分支).

以下是我推送子树的方法:

git push heroku `git subtree split --prefix=backend staging`:master
Run Code Online (Sandbox Code Playgroud)

一个相关的错误:

error: unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@heroku.com:myapp-staging.git'
Run Code Online (Sandbox Code Playgroud)

我试过了git fetch heroku.这个"不合格的目的地"是什么意思?这个命令不应该创建远程分支吗?

oco*_*lot 10

好的,感谢http://makingsoftware.wordpress.com/2013/02/16/using-git-subtrees-for-repository-separation/

我试过了:

git subtree split --prefix=bakcend -b test
git push heroku test:master
Run Code Online (Sandbox Code Playgroud)

它就像一个魅力.问题可能是使用子树命令创建分支...