Expand git subdirectory on hero

I need to deploy a git subdirectory from a non-master branch. I reviewed this answer and docs on Heroku , but when I question

git subtree push --prefix visualizations heroku develop:master 

I get the following error

 error: src refspec d02911f4e410256fae0760f87f186289436ff98b:refs/heads/develop does not match any 

And I really don't know how to act.

+6
source share
1 answer

The git subtree push does not use the localBranch:remoteBranch syntax used in simple git push to determine which local branch falls into which remote branch. You may only need to change this last parameter:

 git subtree push --prefix visualizations heroku master 

Since git subtree push creates a new commit for the subtree, and this is what was pressed, there is no need to define the local branch as the source.

Using the command above you tell git to create a new subtree commit from visualizations and push it to the master branch on the heroku remote.

+8
source

Source: https://habr.com/ru/post/954048/


All Articles