james
james

Reputation: 4047

Heroku and Git are not updating, pushing, or pulling properly

I'm literally falling apart at the seams with angry, nervous laughter. Someone PLEASE help me...

Screenshots: https://medium.com/p/4ff0a5af7f53

  1. Run git status, I am on working branch Redesign with nothing to commit and a clean working directory.
  2. Run rails server and navigate to localhost:3000. Yay pretty website, let's just denote it with a variable ABC
  3. Run git push heroku Redesign:master, it tells me everything is up to date
  4. Navigate to the website... it shows me a website that's totally different, XYZ, from several months ago
  5. Ok, so I'm going to humor this, I'm going to navigate to a new branch Rollback and run a git pull from Heroku
  6. Now on this Rollback branch I'm going to run rails server expecting to see the XYZ old site that I just pulled from Heroku
  7. False, I instead get ABC (and the Sublime code shows the code for ABC as well)

By the way running the push with --force does not help. When I run heroku releases there is no record of this push.

WHAT IS HAPPENING????????

Sorry if I seem desperate... I've been at this for 2 hours

Upvotes: 0

Views: 127

Answers (2)

james
james

Reputation: 4047

Ok this was dumb of me, @Chris I think you were going to stumble upon it. I had done a heroku rollback and didn't realize that when you rollback on Heroku, the git repo head commit doesn't change.

This is the thread that solved it: heroku rollback didn't update the HEAD remote branch, did it?

Upvotes: 1

Richard Peck
Richard Peck

Reputation: 76784

git add .
git commit -a -m "Message"

Have you performed these before you try and push? You have to update your local git repo before sending to Heroku

Upvotes: 0

Related Questions