詳細検索

Initialize and update submodules at the same time as cloning in git

Avatar
by 平形大樹
1 min read
Tags git

Initialize and update submodules at the same time as cloning in git
Translated from 日本語 • View original

Hello.
It is a flat form of development.

This is my first post.

After clone in Git, it often doesn't work because something is missing.

And then you notice.

Oh, don't clone the submodule!
*This article is helpful for submodules.

How many times has this pattern been like this!
I hate myself.

And always,

git clone git://github.com/foo/bar.git
git cd bar
git submodule update --init --recursive

That's why I do the regular work.
But I tend to forget.

So, when I looked it up, I found that there was a proper one.

git clone --recursive git://github.com/foo/bar.git

Now, the submodule will be cloned at the same time as the clone.
There is no need to use it separately from regular clones, so I will use it from now on.

Thank you for reading.

The cold days are still going on, but please take care of yourself.

Page referenced

http://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules

Related Articles