LoginSignup
0
0

More than 3 years have passed since last update.

Git で submodule 含んで最新コミットだけ checkout したい

Last updated at Posted at 2020-09-28

背景

  • llvm-project とか repo サイズが大きいのを submodule で git repo に追加している.
    • 普通に引くと 1GB とか 2GB とかになるような repo で, でかくてつらい
  • しかしビルドに使うだけなので, 最新コミットだけ引ければよい
    • CI でビルドしたいとか.

方法

--depth 1 で最新コミットだけ引けますが, submodule には適用されません.

Using git to get just the latest revision
https://stackoverflow.com/questions/1209999/using-git-to-get-just-the-latest-revision

--recurse-submodules --shallow-submodules つければいけそうであるが, オプションは古いようで最新 git では利用できない.

結論

未解決

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