Skip to content

Instantly share code, notes, and snippets.

View miwgel's full-sized avatar
🎯
Focusing

Miguel B. miwgel

🎯
Focusing
View GitHub Profile
@miwgel
miwgel / create git submodule.md
Last active June 7, 2023 18:37
Best way to create a git submodule

Create git submodule

Run in terminal

  • git submodule add -b <branch> <source-github-repository-url> <destination-path-within-project>
  • In case the submodule has submodules within: git submodule update --recursive --init
@miwgel
miwgel / remove submodules.md
Created June 2, 2023 15:18
The best way to remove a Git Submodule

Remove Git Submodules

Run in terminal

  • git rm <path-to-submodule>
  • rm -rf .git/modules/<path-to-submodule>
  • git config --remove-section submodule.<path-to-submodule>

Example:

  • Open terminal