Open Metric
Science, Fiction and Me

Today I Learned

Git Pull with Submodule

For a repo with submodules, we can pull all submodules using

git submodule update --init --recursive

for the first time. All submodules will be pulled down locally.

To update submodules, we can use

git submodule update --recursive --remote

or simply

git pull --recurse-submodules

The first one works for git version 1.8.2 or above while the second one works for git version 1.7.3 or above.

For More git related TIL, checkout this link: https://datumorphism.leima.is/tags/git/

References:

  1. Easy way pull latest of all submodules @ stackoverflow.com

A Random #TIL# for You


Most technical TILs will be updated at datumorphism.leima.is/til

By OctoMiao

Last updated