2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【git】submoduleでプルリク送るまでの流れ

Last updated at Posted at 2018-09-20

1. branchをきる(in submodule)

まずサブモジュールで作業する

cd submodule/

git checkout -b feature/submodule

2. git add/commit(in submodule)

git add .
git commit -m "add config"

3. リモートブランチにpush(in submodule)

git push origin feature/submodule

4. メインリポジトリでsubmoduleのcommit取り込み

git add submodule
git commit -m "update submodule"

5. プルリクだす

  1. submoduleのgithubでプルリク作成
  2. メインリポジトリのgithubでプルリク作成

memo: 1~3をメインリポジトリから操作する場合

※動作未確認

// サブモジュール外で

git submodule foreach git add -A
git submodule foreach git commit -m "add config"
git submodule foreach git checkout -b feature/submodule
git submodule foreach git push origin feature/submodule
2
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?