加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何将Git子目录推送到heroku?

发布时间:2020-12-17 02:33:29 所属栏目:百科 来源:网络整理
导读:在 github上,我在目录的子目录中有一个Rails应用程序github.com/sadaf2605/directory/subdirectory/{rails app}.当我尝试将此应用程序推送到Heroku时出现错误: ! Heroku push rejected,no Cedar-supported app detectedTo git@heroku.com:damp-woodland-756
在 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 rejected,no Cedar-supported app detected wordpress”后,我了解到该子目录导致了问题.但是,我希望这个子目录保留在github,因为它可以帮助我组织我的工作,但我不想更改route.rb.可能吗?

解决方法

查看 git-subtree插件.您可以使用它将子项从项目拆分为子项目并返回.

git subree push –prefix {rails app} heroku master

克隆github项目并运行sudo sh install.sh来安装插件.完整使用说明见here

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读