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.
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
The Heroku platform uses Git as the primary means for deploying applications (there are other ways to transport your source code to Heroku, including via an API). When you create an application on Heroku, it associates a new Git remote, typically named heroku , with the local Git repository for your application.
Open Deploy tab and scroll to the “Deployment method” section. Select GitHub as the method. It will show a “Connect to GitHub” option where we can provide our GitHub repository. If you are doing it for the first time, Heroku will ask permission to access your GitHub account.
You can use https://github.com/ddollar/heroku-push and push directories without git.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With