LoginSignup
0
0

More than 5 years have passed since last update.

git submoduleの自分メモ

Last updated at Posted at 2016-12-03

Railsの上にWordPressを置きたかったのでsubmoduleでやってみた。

まずはメインリポジトリとサブモジュール用のリポジトリ、どちらも普通にリポジトリ登録。

メインリポジトリでsubmoduleを登録する

git submodule add リモートリポジトリ パス

RailsでWordPressを動かす場合パスは public/blogとか

addしてcommitしておく

本番でcloneする

git submodule update --init

もしサブモジュールに更新があったときは

git submodule foreach git pull origin master

で最新版をpullしてこれる

stashはこれ

 git submodule foreach 'git stash'
0
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
0
0