[英]How push Git sub-directory to heroku?
在github上,我在目录的子目录中有一个Rails应用程序github.com/sadaf2605/directory/subdirectory/{rails app}
。 当我尝试将此应用程序推送到Heroku时出现错误:
! Heroku push rejected, no Cedar-supported app detected
To git@heroku.com:damp-woodland-7566.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:damp-woodland-7566.git'
在阅读“ Heroku push被拒绝,没有Cedar支持的应用程序检测到wordpress ”后,我了解到这个子目录导致了问题。 但是,我希望这个子目录保留在github,因为它可以帮助我组织我的工作,但我不想更改route.rb。 可能吗?
检查git-subtree插件。 您可以使用它将子项从项目拆分为子项目并返回。
git subtree push --prefix {rails app} heroku master
克隆github项目并运行sudo sh install.sh
来安装插件。 完整的使用说明在这里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.