Last active
October 8, 2021 10:33
-
-
Save rupe120/92200f38b92dd85721378b9a03707f77 to your computer and use it in GitHub Desktop.
Git pull 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
# This syntax is compatible with both Powershell and Bash | |
git pull | |
git submodule update --init --remote | |
git submodule foreach -q --recursive 'git switch $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main)' | |
git submodule foreach -q --recursive 'git pull' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment