Deploy git subdirectory on heroku

帅比萌擦擦* 提交于 2019-12-06 02:07:58

问题


I have to deploy a git subdirectory from a non master branch. I have looked at this answer and to the docs on Heroku, but when I issue

git subtree push --prefix visualizations heroku develop:master

I get the following error

error: src refspec d02911f4e410256fae0760f87f186289436ff98b:refs/heads/develop does not match any

And I really don't know how to proceed.


回答1:


The git subtree push command does not use the localBranch:remoteBranch syntax used in the plain git push to define what local branch gets pushed into what remote branch. What you might need is just to change that last parameter:

git subtree push --prefix visualizations heroku master

Since git subtree push creates a new commit for the subtree, and that is the one pushed, there is no need define a local branch as a source.

With the above command you are telling git to create a new subtree commit from visualizations and to push it to the master branch on the heroku remote.



来源:https://stackoverflow.com/questions/18868769/deploy-git-subdirectory-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!