LoginSignup
2
0

More than 1 year has passed since last update.

【Rails Docker Git】よく使うコマンド一覧

Last updated at Posted at 2020-04-21

【Rails Docker Git】よく使うコマンド一覧

Dockerでサーバー立ち上げ

terminal
> docker-compose up

Dockerでサーバーダウン

terminal
> docker-compose down

DockerでDB確認

terminal
> docker-compose ps

rails db:create

terminal
> docker-compose exec イメージ名 ./bin/rails db:create

railsタスク一覧(コマンド一覧)

terminal
> docker-compose exec web ./bin/rails -T

gitのカレントブランチを確認

terminal
> git branch

gitのブランチを新規作成してテェックアウト

terminal
> git checkout -b ブランチ名

gitのステージングされテイルファイルのキャシュをみる

terminal
> git diff -cashed

gitのブランチを削除する

terminal
> git branch -d 削除したいブランチ名

gitのブランチをmergeする

terminal
> git merge マージしたいブランチ名

リモートブランチを取得して、継続して開発したいとき

terminal
> git fetch origin リモートブランチ名
> git checkout -b リモートブランチ名 origin/リモートブランチ名
2
0
0

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
2
0