[git] remote rejected master -> master (pre-receive hook declined)

If you get this error and the terminal is not descriptive enough to help you, Heroku might be able to tell you what is wrong through their website. Try the following:

  1. log in to Heroku and go to your dashboard;
  2. select the problem application from the list; and,
  3. check the build logs under the "Activity" tab.

In my case, I had accidentally ignored my Gemfile.lock.