web_bonsaiリポジトリをGitHubで作成してcloneする
Githubでプルダウンから Add .gitignore: Rails
を選択してweb_bonsaiリポジトリを作成しました。
cloneして、ローカルにweb_bonsaiディレクトリができました。
GitHubで生成された.gitignoreファイルの記述内容
以下の通りでした。rails6に対応した.gitignoreファイルなんだろうなと思います。
*.rbc capybara-*.html .rspec /db/*.sqlite3 /db/*.sqlite3-journal /db/*.sqlite3-[0-9]* /public/system /coverage/ /spec/tmp *.orig rerun.txt pickle-email-*.html # Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep # TODO Comment out this rule if you are OK with secrets being uploaded to the repo config/initializers/secret_token.rb config/master.key # Only include if you have production secrets in this file, which is no longer a Rails default # config/secrets.yml # dotenv # TODO Comment out this rule if environment variables can be committed .env ## Environment normalization: /.bundle /vendor/bundle # these should all be checked in to normalize the environment: # Gemfile.lock, .ruby-version, .ruby-gemset # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc # if using bower-rails ignore default bower_components path bower.json files /vendor/assets/bower_components *.bowerrc bower.json # Ignore pow environment settings .powenv # Ignore Byebug command history file. .byebug_history # Ignore node_modules node_modules/ # Ignore precompiled javascript packs /public/packs /public/packs-test /public/assets # Ignore yarn files /yarn-error.log yarn-debug.log* .yarn-integrity # Ignore uploaded files in development /storage/* !/storage/.keep
web_bonsai/railsディレクトリを作成して.gitignoreを移動する
web_bonsaiディレクトリの中にrailsディレクトリを作成します。
$ mkdir rails
ファイルを移動します。
$ mv .gitignore rails/.gitignore
一旦addしてcommit
ファイルの移動だけで一旦コミットします。
web_bondai/.gitignoreを作成する
前回の記事で作成したprojectディレクトリ内ファイルとディレクトリをここに移動してくる想定で.gitignoreを作成します。
記述した内容は以下の通りです。
# root docker-compose.yml # https_portal https_portal # nginx nginx/nginx.conf nginx/log/nginx/access.log nginx/log/nginx/error.log # rails
一旦pushする
一旦pushして今回はここまでにしました。