Deborah
Deborah

Reputation: 4575

Need clear steps to pull Git app into Heroku

I'm a Git/Heroku newbie and am having trouble with the steps in Heroku's documentation - I can't figure out this one crucial step (even after looking at related posts in StackOverflow, most assumed a workflow already in place).

In local dev, "myapp" is correctly hooked up to Git repository "myapp". I can push and pull commits, also see them on the GitHub site in the "myapp" repository.

In Heroku, I've created the app, "put-myapp-here-dangit", and under the setting "GitHub Repo", I've entered "(myusername)/myapp".

Heroku Toolbelt and GitHub command line tools are installed locally. In Terminal, git remote -v shows both repositories:

heroku  [email protected]:put-my-app-here-dangit.git (fetch)
heroku  [email protected]:put-my-app-here-dangit.git (push)
origin  https://github.com/myusername/myapp.git (fetch)
origin  https://github.com/myusername/myapp.git (push)

This is where I'm stuck, and none of the documentation makes clear how to get the "myapp" files from GitHub to Heroku. I'm scared to blindly keep trying commands because I know I can make an svn mess if I use the wrong one.

[Heroku "put-my-app-here-dangit"] --> help??? <-- [Git "myapp"] --><-- [local "myapp"]

Can anyone outline the actual steps needed, including things I might not know (like if I need to open the Terminal IN my local "myapp" folder or where - Git or Heroku - I need to add my other account as a collaborator if necessary)? I'm about to rip my hair out.

Upvotes: 0

Views: 293

Answers (1)

Dennis Hackethal
Dennis Hackethal

Reputation: 14275

I have never tried getting it from GitHub to Heroku, but from your local machine to heroku. Pull the latest version to your local machine from github (if you don't have it already), then follow these steps:

  • $ heroku login
  • locally cd into your app, $ cd myapp
  • $ git push heroku master

Also notice you need to use postgresql on heroku, so your gemfile should look as follows:

group :production do
 gem 'pg'
end

group :development, :test do
  gem 'mysql2' # or whichever db you are using
end

The steps outlined above are from herokus official section on how to get started.

Are you using the same guide? If so, where exactly are you encountering problems in there?

Upvotes: 3

Related Questions