Skip to content

Instantly share code, notes, and snippets.

@andrewhosgood
Last active December 1, 2017 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhosgood/c07c0d9f079559579ac0 to your computer and use it in GitHub Desktop.
Save andrewhosgood/c07c0d9f079559579ac0 to your computer and use it in GitHub Desktop.
Useful Git commands
Pull all submodules, even if not initialised
$ git submodule update --init --recursive
Add a course as a submodule
$ git submodule add [repo URL] src/courses/[course name]
View statuses of all submodules
$ git submodule status
Pull all course submodules (assuming default of master branch)
$ git submodule foreach git pull origin master
http://stackoverflow.com/questions/4611512/is-there-a-way-to-make-git-pull-automatically-update-submodules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment