0

I have an rails application named as myapp. And i have created a git repository recently and i pushed all my files to git using git push origin master this successfully pushed all my files. And later on i created heroku app using heroku created on the myapp directory.

while checking with git remote -v i got following result

heroku  git@heroku.com:myappname.git (fetch)
heroku  git@heroku.com:myappname.git (push)
origin  https://github.com/username/myreponame.git (fetch)
origin  https://github.com/username/myreponame.git (push)

Now how can i move all my files from git to heroku. Can anyone help.

Prabhakaran
  • 3,900
  • 15
  • 46
  • 113
  • 1
    I've only used heroku a few times, but I think you're supposed to `git push heroku master` or something like that if you want to deploy to heroku. –  Aug 18 '13 at 18:22
  • I want to move files only from git to heroku not directly to heroku. – Prabhakaran Aug 18 '13 at 18:23
  • I don't understand the difference. If you use `git push heroku master`, you should be pushing your code in the `master` branch to heroku. –  Aug 18 '13 at 18:27

1 Answers1

0

See the last answer at Checking in code without deploying on Heroku.

In general, once you git push heroku master, it will automatically deploy. So if you don't want that, the easiest would be to push it to a different branch in Heroku.

BUT! Do not treat Heroku like github/bitbucket/insert favourite VCS provider. It just happens to use git as part of its deployment, because that is doing it wrong™.

So you're better of storing your code in github, and let heroku handling deployments (and not store your code).

Community
  • 1
  • 1
Benjamin Tan Wei Hao
  • 9,621
  • 3
  • 30
  • 56
  • Erm, I just explained. Use Heroku _only_ for deployment and hosting, not source control. – Benjamin Tan Wei Hao Aug 19 '13 at 04:28
  • I may be confused merely by your wording. I think that deployment-via-git is one among many ways of "doing it right", and that git-hosting-at-heroku is "doing it wrong." Is this what you mean too? – yfeldblum Aug 19 '13 at 05:09