Picture of Brian Love wearing black against a dark wall in Portland, OR.

Brian Love

Git Submodule Cheat Sheet

A quick and dirty cheat sheet for Git submodules. In the examples I am using the FontAwesome repository hosted on GitHub.

Remove existing files from index

$ git rm -r src/less/font-awesome

Add submodule

$ git submodule add git@github.com:FortAwesome/Font-Awesome.git src/less/font-awesome

Update all submodules

$ git submodule foreach git pull origin