[英]How to git push subtree from a local branch to heroku master
我有一個不在我的git存儲庫根目錄的rails應用程序。 / repositoryroot / MYAPP
當我通常將應用程序推送到heroku時,我使用git subtree -P myapp/ push heroku master
。
現在我在heroku上添加了一個臨時應用程序,我在本地分支下進行了一些更改,我想將其推送到臨時應用程序。
heroku文檔說我可以通過git push staging localbranch:master
將本地分支git push staging localbranch:master
但是當我嘗試將兩者結合起來並執行git subtree -P myapp/ push staging localbranch:master
我從git中得到一個錯誤。
error: src refspec d24e1<some more hex gibberish>202a54e:refs/heads/localbranch does not match any.
error: failed to push some refs to 'https://git.heroku.com/mystagingapp.git'
如何將作為app / repositoryroot / myapp根目錄的子文件夾從本地分支推送到heroku staging? 我需要特殊的refspec嗎? 或者這甚至可能嗎?
謝謝
我能夠回答我自己的問題。
git push staging `git subtree split -P myapp/ localbranch\`:refs/heads/master
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.