This is one of those problems that I run into infrequently enough that I don't always immediately remember the answer. It usually happens when I'm working on a local topic branch and I try to push it to our staging instance on Heroku.
I push my code as usual, using
git push heroku master
Then I go to test my changes, and wtf? Its like nothing's changed at all. Then I usually try one or more of the follow things:
- Doing a push with the
- Commiting some trivial whitespace-only change
- Attempt to test any model-related changes via the console
- Add a
raise "boom"somewhere and commit/push, expecting an exception
- Curse at the computer
Then, at some point, I remember that heroku always commits the master branch. Doh! No wonder I wasn't seeing any of my changes. So I reset head back to somewhere before all of the useless commits of the last 5 minutes, and then push my topic branch like so:
git push heroku branch_name:master
Suddenly everything works as intended and I no longer want to strangle kittens.