Showing posts with label Heroku. Show all posts
Showing posts with label Heroku. Show all posts

Thursday, April 23, 2015

How to Link a Git Folder with an Existing Heroku App


  1. Follow this guide to get Heroku setup on your command line tool of choice.
  2. heroku git:remote -a project_name

where project name is the name of your Heroku app (if your app's URL is stellablog.herokuapp.com, project_name would be stellablog) and you're done! Your local Git folder will be linked with your Heroku app, and you can deploy your latest code to it.

Monday, April 20, 2015

How to Push a Local Branch to a Separate Remote Branch

This is my first post about Git! I'll be talking about how to push the contents of a local branch to a remote branch that is different from what it currently points to. The base syntax is

git push remote local_branch:remote_branch

An example of when to use this is in combination with Heroku. You might want to push your local branch to Heroku's master branch:

git push heroku foo_branch:master

That is also how you make Heroku run a non-master git branch.

Maybe you want to push the contents of your current branch to another branch on git:

git push origin foo_branch:bar_branch