How can I deploy old commits to Heroku

We’re trying to deploy a big Rails project to Heroku for the first time, but something’s breaking during the Heroku compilation process and we have no way of knowing what.

So now we’re going to plan B, which is to walk up the commit chain and test deploy each step of the way against Heroku until we figure out at which point it becomes un-compileable. (Yea, it’s the best I could come up with at this point.)

  • linking github to my server
  • List modified file names in a git stash
  • Squashing commits after they are pushed
  • Compressing many commits into fewer, but larger, commits
  • Graphic added/deleted lines by user
  • Git branches not merged after switching from svn
  • So I figured I’d just clone the project locally, checkout some old commits, and push to heroku. But then I discovered that if I push to heroku from anything but master, it doesn’t build the app?? Instead it says: “Pushed to non-master branch, skipping build.”

    So now even my bad plan is a non-starter. I’m just looking for a break here. Any ideas on how to do what im trying to do?

  • Beyond Compare as a Diff tool with Git - How to command line switch like: /expandall
  • Make git ignore generated files
  • Git Bash for Windows showing/expecting file paths with forward-slashes, no drive colon
  • Git stash local or in git repository
  • Move initial commits off master to another branch in Git
  • Is it possible to have a local file that's different from its remote counterpart on Github?
  • 2 Solutions collect form web for “How can I deploy old commits to Heroku”

    It’s not that Heroku only builds if you push from master, rather Heroku will only build if you push to master. If you just do

    git push heroku
    

    then you are probably pushing your local branch to one with the same name on Heroku (the exact default behaviour is configurable). You can push from a different local branch to Heroku master with

    git push heroku my_local_branch:master
    

    or, if you are already checked out on my_local_branch you could use

    git push heroku HEAD:master
    

    See the documentation for git push – the examples towards the end in particular may help.

    You will probably also need to use -f to force the push:

    git push -f heroku my_local_branch:master
    

    It’s a lot easier to achieve the desired result with heroku instead of the multi-step git process of checking in code, and pushing it. This keeps your git history clean.

    $ heroku releases
    $ heroku rollback v11
    
    Git Baby is a git and github fan, let's start git clone.