「git submodule tracking latest」で述べたように、git 1.8.2 (2013 年 3 月) 以降、サブモジュールでブランチの HEAD を追跡できます。
git submodule add -b <branch> <repository> [<path>]
サブモジュール SHA1 は、まだ親リポジトリにgitlink (インデックス内の特別なエントリ)として記録されています。
ただし、git submodule update --remote
サブモジュールのリモート リポジトリのブランチの HEAD に一致する SHA1 にそのエントリを更新します。
既存のサブモジュールがある場合は、次のようにブランチをたどることができます。
cd /path/to/your/parent/repo
git config -f .gitmodules submodule.<path>.branch <branch>
cd path/to/your/submodule
git checkout -b branch --track origin/branch
# if the master branch already exist:
git branch -u origin/master master
cd /path/to/your/parent/repo
git add path/to/your/submodule
git commit -m "Make submodule tracking a branch"