How can I push a part of my git repo to Heroku?
The git subtree
command (built in, now) is a good way to do this. If you want to push a subtree of a branch to become your master, you can use something like:
git push --force heroku `git subtree split --prefix web HEAD`:master
You can use git subtree push
. It will generate a new commit tree with your directory as root, and push it.
git subtree push --prefix web heroku master
Full documentation is here.