簡體   English   中英

如何將Git子目錄推送到heroku?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM