DEV Community

Jesse Smith Byers
Jesse Smith Byers

Posted on

How To Update A Deployed App On Heroku

Every time I make a small update to an app I've already deployed, I find myself going back to the Heroku documentation. Here's a quick guide on how to update an app that you've already deployed.

1. Clone the repository from GitHub to your local device:

git clone <YOUR HTTPS URL FROM GITHUB>
Enter fullscreen mode Exit fullscreen mode

2. Make your changes, and commit them to GitHub:

git add .
git commit -m "<YOUR COMMIT MESSAGE>"
git push origin <YOUR BRANCH NAME>
Enter fullscreen mode Exit fullscreen mode

3. Login to your Heroku account:

heroku login
Enter fullscreen mode Exit fullscreen mode

Follow the directions on the screen to login to your account through the browser, then return to the terminal.

4. Set remote for your project:

heroku git:remote -a <YOUR PROJECT NAME>
Enter fullscreen mode Exit fullscreen mode

5. Push to Heroku master to deploy updates:

git push heroku master
Enter fullscreen mode Exit fullscreen mode

And that's it! 5 simple steps. Hopefully this might save you from digging through the documentation each time!

Top comments (6)

Collapse
 
fransco35 profile image
Fransco35 •

Thanks, your post has been of great help to me.

Collapse
 
sajjadalidev profile image
Sajjad Ali •

Thanks man it helps me :)

Collapse
 
goran7777 profile image
Goran •

Thank you buddy (Y)

Collapse
 
steve_cons profile image
Stefano •

thanks a lot!

Collapse
 
tobisam2000 profile image
Oluwatobiloba Adesokan •

helpful, thanks

Collapse
 
sreebash profile image
Sreebash Chandra Das •

Thanks. It worked!