/ git

# I always forget how to update and init GIT submodules

Indeed, I always forget that f*****g command line when I clone a GIT repository for which I need to update or init the submodules. (I said or instead of and/or because or is enough... I should write about it).

To properly initialize your GIT submodules, you'll want to use the --init option to which will make it initialize any uninitialized submodules:

$git submodule update --init --recursive  in some older versions of Git, if you use the --init option, then, already-initialized submodules may not be updated because an interference in the priority of parameters. You should also run the command without --init option. $ git submodule update --recursive


So now is my simple shell script:

#!/bin/sh
git submodule update --init --recursive
git submodule update --recursive