A better understanding of how to use Git submodules

Written on November 3, 2015

I’ve shared about Git submodules before. I recently decided to use submodules again in some projects I’m developing because I decided to fork a Sass library to use and modify for my projects’ needs.

Submodules are useful since I can essentially treat a submodule as its own repo and make changes to it separate from the project from which it is used in.

I ran across, Chris Jean’s post on git submodules and it definitely gave me a better understanding of Git submodules. If you’re interested in using it yourself, I definitely suggest checking out his article.

One thing I would like to add on top of Chris Jean’s post is the part on how to remove a submodule.

An extra step that I had to take was to go into the .git folder found in my project’s root directory. And remove folders found in the modules folder to completely remove a submodule.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image