Skip to content

Instantly share code, notes, and snippets.

@wojciak
Created September 4, 2014 07:51
Show Gist options
  • Save wojciak/9d6defeac22df96f347f to your computer and use it in GitHub Desktop.
Save wojciak/9d6defeac22df96f347f to your computer and use it in GitHub Desktop.
Git branch submodules prior to git 1.8.2
git submodule foreach -q --recursive 'branch="$(git config -f $toplevel/.gitmodules submodule.$name.branch)" && git checkout $branch'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment