Skip to content

Instantly share code, notes, and snippets.

@ggarnier
Created June 11, 2013 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggarnier/5761385 to your computer and use it in GitHub Desktop.
Save ggarnier/5761385 to your computer and use it in GitHub Desktop.
Checks the status for all my git projects
#!/bin/bash
# check-git-status.sh - Checks the status for all my git projects
# Usage: check-git-status.sh <main projects directory>
if [ -z "$1" ]; then
mainDir="$HOME/Projects"
else
mainDir="$1"
fi
for dir in `ls -d1 $mainDir/*/`
do
cd $dir
status=`git status -s 2> /dev/null`
if [ -n "$status" ]; then
echo -e "[$dir]\n$status\n"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment