Forcing git push not a good idea because you lost any obligation that you or other employees made that you were not in your working copy.
Before clicking, you must either merge or recreate the upstream changes to the local working copy.
To merge changes locally
$ git pull heroku master $ git push heroku master
To save changes locally
$ git pull --rebase heroku master $ git push heroku master
By the way, now that you have pushed your changes, you actually do not need to do anything. The remote repository already contains all your changes.
If for some reason the $ git status command returns obsolete links, just run
$ git pull heroku
to get all deleted changes. Note that if you do not specify a target branch (or you have a tracking branch enabled), git pull will simply load (rather than merge) upstream changes.
Also note that Heroku should not be considered a git host. This means that it is extremely unusual to perform a git pull from Heroku. Instead, you should use git hosting (like GitHub or BitBucket) to store your repository and only push to Heroku to deploy the application.
source share