Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Heroku think everything is up-to-date when it isn't?

Tags:

git

heroku

On Heroku I have a production app and I know have a staging app:

$ heroku list
=== My Apps
testivate
testivate-staging

I have remotes for each:

$ git remote -v
heroku  [email protected]:testivate.git (fetch)
heroku  [email protected]:testivate.git (push)
staging [email protected]:testivate-staging.git (fetch)
staging [email protected]:testivate-staging.git (push)

A few days I go, a deployment broke my production app, so I used heroku rollback, finally created the staging app I am using now, and pushed my code to the staging app, presumably with git push staging master. (This was a few days ago but I'm pretty sure that's what I did.)

It's all working now on my staging app, so I'm trying to push my code to my production app.

However, Heroku keeps telling me that my production app is already up-to-date:

$ git branch
* master

$ git status
# On branch master
nothing to commit (working directory clean)

$ git add .
$ git add -u
$ git commit -m "trying to commit"
# On branch master
nothing to commit (working directory clean)

$ git push heroku master
Everything up-to-date

$ git remote show staging
* remote staging
  Fetch URL: [email protected]:testivate-staging.git
  Push  URL: [email protected]:testivate-staging.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (up to date)

$ git remote show heroku
* remote heroku
  Fetch URL: [email protected]:testivate.git
  Push  URL: [email protected]:testivate.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (up to date)

I know that Heroku is wrong however, because there are some clear-as-day changes to my views which you can see in my local code and on the staging server, but not on my live production app.

For example, compare the "back" link that is correctly here in my staging app, but not here in my production app.

How do I get Heroku to update my production app as I want?

Thanks,

Steven.

like image 696
steven_noble Avatar asked Nov 26 '12 22:11

steven_noble


1 Answers

Are you sure you're referring to the correct branch? Here's the syntax of the actual command:

git push heroku <the branch you wish to push>:<the branch on the heroku server you wish to push to>

So if you're used to running

git push heroku master

and you checkout and commit to a branch other than master, running git push heroku master will push your unchanged master branch. Instead, run

git push heroku the_branch_i_changed:master
like image 186
Starkers Avatar answered Oct 19 '22 05:10

Starkers