Deploying to Heroku using git on bitbucket

Wasswa Samuel picture Wasswa Samuel · Nov 5, 2012 · Viewed 51.2k times · Source

I want to host my source on bitbucket using git because I obviously get a free private repo and I want to host my app on heroku using the source code from bitbucket.

Can i do it using the github client and heroku toolbelt. Will it work? Github is great but i dont want everyone seeing my code and I dont want to pay for a private repo because its a small project.

Answer

Xavier picture Xavier · Nov 6, 2012

Deploying to Heroku should work regardless of where you host your code as the Heroku CLI adds it's own git remote for the sake of deployments. In fact, you can even git pull from Heroku, so you could technically use Heroku as a private git repository instead (though not recommended). As for using the GitHub client to connect to bitbucket, simply change the repository remote to the URL provided by bitbucket in the settings tab of the client.