MultiMarkdown-6/link_git_modules

22 lines
600 B
Plaintext
Raw Normal View History

2015-06-16 03:45:51 +03:00
#!/bin/sh
2015-11-12 17:31:28 +03:00
# 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
2015-06-16 03:45:51 +03:00
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 ..