I have been creating a GitHub project. Now I'm planning on hosting it on Heroku. It looks like Heroku creates a new git repository and expects me to use it for my project. How can I point Heroku at my existing repository?
Git remotes are versions of your repository that live on other servers. You deploy your app by pushing its code to a special Heroku-hosted remote that’s associated with your app. The heroku create CLI command creates a new empty application on Heroku, along with an associated empty Git repository.
First remove the heroku remote git remote rm heroku Add it again correctly git remote add heroku https://git.heroku.com/sleepy-escarpment-1894.git Then push your app git push heroku master Share Follow answered May 27 '15 at 6:32 Igal S.Igal S.
By convention, the remote name "heroku" is typically used for the production application. As @voke points out, you can alternatively use a Heroku CLI command to add your remote. However, it looks like this will always use the default remote name heroku for the remote.
Heroku is a deployment platform where you can deploy your web apps in a easy-to-use manner. We usually deploy it by creating a new repository in Heroku Git and then push our code into it. It has one more easy option where you can just connect one of your Git repo with the Heroku app and deploy its branch.
you still need your github repository.
git remote add heroku {heroku repository path}
will add another remote repository to your code, then
git remote
will list all your remotes, probably
-- origin
-- heroku
and then
git push {remote name} {branch name}
will push to the appropriate remote:
git push heroku master
will start your deployment
git push origin
or probably just
git push
will push your changes just on github
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