Created
December 26, 2017 08:42
-
-
Save y2k-shubham/ae82f82660c7b23d6ee54dba50c26fc0 to your computer and use it in GitHub Desktop.
Git recursive checkout (branch switch) on project with submodules
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 | |
((!$#)) && echo No branch name, command ignored! && exit 1 | |
git checkout $1 && git submodule foreach --recursive git checkout $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read about entire setup here