Get status without touching the repo (by using a temporary copy).
--- /dev/null
+#! /bin/sh
+
+cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" &&
+cd "$HOME"/tmp && rm -rf ls-not-pushed-carefully.tmp &&
+
+LSTMP="$HOME"/tmp/ls-not-pushed-carefully.tmp \
+"$PROG_DIR"/do-all \
+ 'test "$g" = "$d/.git" || continue;' \
+ 'rsync -aW --del --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \
+ 'test -n "`git status -b | grep "ahead\|behind"`" && echo "$d"' &&
+
+cd "$HOME"/tmp && exec rm -rf ls-not-pushed-carefully.tmp