How to Make Changes to The Application Deployed on Heroku ?
Last Updated :
15 Jul, 2025
Many of the times we need to make changes to our deployed project for some reason. Either we want to have a new version of the project, add new features to the project, remove a bug, or for some other reasons. If your project is deployed on Heroku Cloud Platform, you can easily make your changes using the CLI and deploy them to Heroku. In this blog, we will discuss the step-by-step process to make changes in your project and deploy it on Heroku. Let's start first with the short introduction of Heroku...
Heroku is a cloud platform service that allows you to build, deliver, monitor, and scale apps. It is a container-based cloud Platform as a Service (PaaS). It provides the freedom to the developers to focus on the core product instead of getting distracted from maintaining servers, hardware, or infrastructure.
Prerequisite: Introduction and Installation of Heroku CLI
Step 1: Download and install Heroku CLI
Heroku CLI can easily be downloaded and installed by the following the steps given here. Make sure to log in to Heroku CLI.



After successful login, you will see the following in the terminal :

Step 2: Clone your repository
Open another terminal and use git to clone your repository.
$ heroku git:clone -a your_app
$ cd your_app

Step 3: Make your changes
Make all the required changes in your project
Step 4: Deploy your changes
$ git add .
$ git commit -am "changes made to the project"
$ git push heroku master



Enjoy! Your project is now successfully updated and deployed.
Now, in case if you want to change your main deploy branch from “master” to "main”(any other branch) for both manual and automatic deploys, you can do so by following these simple steps:
Step 1: Switch default branch from master to main
To do this we first need to create a new branch locally.
$ git checkout -b main
Step 2: Delete the old branch locally
We need to delete the old branch so that the local environment only knows about the main branch.
$ git branch -D master
Step 3: Reset the GIT repository hosted on the Heroku
This will empty the remote repository but it will not impact the running application.
$ heroku repo:reset -a your_app
Step 4: Redeploy the application
Finally, using the new default branch you can redeploy the application.
$ git push heroku main
Similar Reads
How to Deploy Django application on Heroku ? Django is an MVT web framework used to build web applications. It is robust, simple, and helps web developers to write clean, efficient, and powerful code. In this article, we will learn how to deploy a Django project on Heroku in simple steps. For this, a Django project should be ready, visit the f
4 min read
How to deploy React app to Heroku? React is a very popular and widely used library for building User Interfaces. So if you are thinking about deploying your React app to the cloud platform, there are various choices for doing that such as AWS EC2 or Heroku. But for testing your React app, Heroku will be the best option as it is free
3 min read
How to upload Laravel App to Heroku Cloud Application Platform Prerequisites :Knowledge of PHP (Laravel)A Heroku user accountA basic knowledge of Git version control Setting up Heroku CLI: You can download Heroku CLI from here. We recommend you to view this article to install Heroku CLI. Creating a Laravel App: In order to create a laravel app goto your command
3 min read
How to Deploy a Basic Static HTML Website to Heroku? Heroku is a simple and one-stop solution to host any website or server. This article revolves around how you can host your own Static HTML webpage on Heroku. To demonstrate this we are going to build a simple webpage and host it. PrerequisitesGitHeroku AccountHeroku CLI Let's create a directory name
3 min read
How to Install Heroku and Deploy a Static Website on Ubuntu? Heroku is a cloud platform that provides a platform as a service(PAAS) to deploy either static or dynamic websites. Heroku is managed by Salesforce. Heroku allows CI/CD, code rollbacks, automatic deploys, Github integration, app metrics, and much more. Heroku allows building, running, and deploying
3 min read
How to deploy Node.js app on Heroku from GitHub ? In this article, we will be looking at how to deploy your Demo Node.js app to Heroku. At the end of this article, we will have a basic Hello World app running on a public domain that can be accessed by anyone. The Node must be installed on your machine. Refer to this article How to install Node on y
3 min read