LoginSignup
0
0

More than 1 year has passed since last update.

Git submoduleの使い方

Posted at

What is Git submodule

別のリポジトリをサブモジュールとして読み込みます.

必須コマンド

git submodule add https://github.com/hogehoge.git

おすすめのコマンド

git submodule add --name 任意の名前 --branch ブランチ名 https://github.com/hogehoge.git サブモジュールを拡張するディレクトリへの相対パス

まとめ

git submodule add 引数s URL サブモジュールを拡張するディレクトリへの相対パス

注意

サブモジュールをインポートした親リポジトリを新たにGit Cloneした場合, サブモジュールは自動的にインポートされない
下記の様にクローンコマンドの後に**--recursive** をつけることで解決できる

git clone https://github.com/parents_of_hogehoge.git --recursive
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