Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Heroku with an existing GitHub repository [duplicate]

Tags:

github

heroku

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?

like image 799
Kevin Avatar asked Nov 10 '13 07:11

Kevin


People also ask

How do I deploy a git repository to Heroku?

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.

How to push APP from Heroku to master?

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.

What is the default remote name for Heroku?

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.

What is Heroku deployment?

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.


1 Answers

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

like image 185
matteofigus Avatar answered Oct 11 '22 11:10

matteofigus