Created
June 4, 2021 08:28
-
-
Save StephenHodgson/5a4a6cfce9c838afcb05c52932abb03b to your computer and use it in GitHub Desktop.
Recursively checks out all submodule branches instead of being in a detached head
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git submodule foreach -q --recursive 'echo $name && git switch -C $(git name-rev --exclude=refs/tags/\* --name-only $(git rev-parse @{-1}))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment