MultiMarkdown-6/link_git_modules
2015-11-12 09:31:28 -05:00

22 lines
600 B
Bash
Executable File

#!/bin/sh
# This command sets up any git submodules in the project.
# Generally, this only needs to be run once on a freshly cloned
# project, but won't harm anything if run later, provided
# you modify it to accomodate any submodules that should *NOT*
# be on the `master` branch.
git submodule init
git submodule update
git submodule foreach git branch --set-upstream master origin/master
git submodule foreach git checkout master
# If one module needs to follow a different branch:
# cd some_module
# git branch --set-upstream our-branch origin/some-branch
# git checkout our-branch
# cd ..