LoginSignup
26

More than 3 years have passed since last update.

master以外のブランチからherokuにpushする方法

Posted at

railsアプリを作って、herokuをデプロイする(masterブランチ以外からデプロイする方法も同時に載せています。)

1 コミット

$ git add .
$ git commit -m "heroku"
$ git push origin ブランチ名

2 herokuにアプリケーションを新規作成する

$ heroku create

3-1 herokuにデプロイする(masterブランチにいる時)

$ git push heroku master

3-2 herokuにデプロイする(master以外のブランチにいる時)

$ git push heroku <現在いるブランチ名>:master

※3-1 or 3-2 どちらかを実行してください

4 herokuにデータベースを作成する

$ heroku run rails db:migrate

5 アプリケーションを開く

$ heroku open

以上で、完成です。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26