Created
January 18, 2019 05:35
-
-
Save kolosovsky/8d4ad98dba49b2d237fe867f354320df to your computer and use it in GitHub Desktop.
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
repositories=( 'path/to/repo1' 'path/to/repo2' 'path/to/repo2' ) | |
for i in "${repositories[@]}" | |
do | |
cd $i; | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "repo is clean: $i"; | |
else | |
git add . && git commit -m 'message'; | |
fi | |
cd - > /dev/null; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment