[英]How push Git sub-directory to heroku?
On github I have a Rails app in a sub-directory of a directory, github.com/sadaf2605/directory/subdirectory/{rails app}
. 在github上,我在目录的子目录中有一个Rails应用程序
github.com/sadaf2605/directory/subdirectory/{rails app}
。 When I try to push this app to Heroku I get an error: 当我尝试将此应用程序推送到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'
After reading " Heroku push rejected, no Cedar-supported app detected wordpress ", I learned that this sub-directory is causing the problem. 在阅读“ Heroku push被拒绝,没有Cedar支持的应用程序检测到wordpress ”后,我了解到这个子目录导致了问题。 But, I want this sub directory to remain at github as it helps me to organize my work yet I don't want to change the route.rb.
但是,我希望这个子目录保留在github,因为它可以帮助我组织我的工作,但我不想更改route.rb。 Is it possible?
可能吗?
Checkout the git-subtree plugin. 检查git-subtree插件。 You can use it to split subtrees from your project into subprojects and back.
您可以使用它将子项从项目拆分为子项目并返回。
git subtree push --prefix {rails app} heroku master
Clone the github project and run sudo sh install.sh
to install the plugin. 克隆github项目并运行
sudo sh install.sh
来安装插件。 Full usage instructions are in the here 完整的使用说明在这里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.