Created
April 10, 2021 15:19
-
-
Save codetot/6f91965825bd8a5c5319e8af33ec1ea1 to your computer and use it in GitHub Desktop.
Update in each sub git folder
This file contains hidden or 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 --recursive 'git fetch origin && git checkout master && git reset --hard origin/master' |
Author
codetot
commented
Apr 10, 2021
# Branch exists - Exit script if local branch does not exist
git rev-parse -q --verify ${branch} >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Branch ${branch} exists"
fi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment