Knowledge Garden

Search

Search IconIcon to open search

Remove git submodule

Last updated Nov 2, 2022 Edit Source

# remove git submodule

Summary

The 3-steps removal process would then be:

  1. mv a/submodule a/submodule_tmp

  2. git submodule deinit -f – a/submodule

  3. rm -rf .git/modules/a/submodule

  4. git rm -f a/submodule

a/submodule (no trailing slash)

# or, if you want to leave it in your working tree and have done step 0

  1. git rm –cached a/submodule 3bis mv a/submodule_tmp a/submodule

# title: {title}

# Git Submodule

pull all git submodules in repo

1
git submodule update --recursive --remote