Created
January 12, 2016 01:37
-
-
Save mfcovington/da5d38903ebb98cdd274 to your computer and use it in GitHub Desktop.
Find git repositories that need to be pushed to GitHub
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
REPOS_DIR=~/git.repos | |
for DIR in find $REPOS_DIR/* -maxdepth 0 -type d; do | |
cd $DIR | |
NEEDS_PUSH=`git rev-list develop...origin/develop --count` | |
if [ "$NEEDS_PUSH" -gt 0 ]; then | |
echo $DIR >> ~/repos-that-need-pushed | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment