How does git submodule add -b work?
git submodule add -b
After adding a submodule with a specific branch, a new cloned repository (after git submodule update --init
git submodule update --init
Git 1.8.2 added the possibility to track branches.
# add submodule to track master branch git submodule add -b branch_name URL_to_Git_repo optional_directory_rename # update your submodule git submodule update --remote
See also Git submodules