Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git submodule init ignore failed

Tags:

git

kohana

I just pulled https://github.com/kolanos/kohana-universe and now I'm trying to update all the modules running:

git submodule update --init --recursive

Some of the repos are wrong or not existent anymore, and the command breaks in the middle.

Is there an option for the command to ignore the failed updates?

like image 298
Pierre Avatar asked Sep 13 '25 21:09

Pierre


2 Answers

From this page I've found a way to exclude a submodule from submodule update. Suppose the module is dir/name. Then the recursive update-init command for all submodules except this one will look like

git -c submodule.dir/name.update=none submodule update --init --recursive

This doesn't automate skipping any unforeseen errors, but works fine if you know that some particular submodule won't update.

like image 98
Ruslan Avatar answered Sep 15 '25 12:09

Ruslan


The only way i know is to remove broken submodule. This is how you can remove submodules - How do I remove a submodule?

like image 43
Rojan Avatar answered Sep 15 '25 12:09

Rojan