Skip to content

Instantly share code, notes, and snippets.

@codedependant
Created March 13, 2013 17:37
Show Gist options
  • Save codedependant/5154387 to your computer and use it in GitHub Desktop.
Save codedependant/5154387 to your computer and use it in GitHub Desktop.
Bash script to run "git status" in all child directories of a given parent directory
#!/bin/bash
FOLDER=`pwd`
if [ $# -eq 1 ]
then
FOLDER=`readlink -f $1`
fi
echo $FOLDER
for dir in `ls $FOLDER`
do
echo ==========================$dir======================
cd $FOLDER/$dir
git status
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment