Created
May 8, 2020 15:56
-
-
Save Idnan/c26aa339b42fc1a59986af3df3c82136 to your computer and use it in GitHub Desktop.
Script to update all your git repos with remote
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
pull-latest() { | |
for dir in $(find . -name ".git") | |
do cd ${dir%/*} | |
echo $PWD | |
git reset --hard HEAD | |
git checkout develop | |
git pull origin develop | |
if [ -f "./package.json" ]; then | |
yarn install | |
fi | |
echo "" | |
cd - > /dev/null | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment