Skip to content

Instantly share code, notes, and snippets.

@dariye
Last active October 7, 2021 15:23
Show Gist options
  • Save dariye/1cdc25e7a168527f5d035c47f4f9aed3 to your computer and use it in GitHub Desktop.
Save dariye/1cdc25e7a168527f5d035c47f4f9aed3 to your computer and use it in GitHub Desktop.
Deploying to Heroku from Subfolder

Context

What happens when you have a nested directory you want to deploy i.e

./root_dir/
|__sub_dir
|__..

Usage

cd root_dir
# Always execute commands in root dir
git subtree push --prefix [sub_dir] heroku master # normal push
git push heroku 'git subtree split --prefix [sub_dir] branch':master --force # force push

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment