Last active
July 29, 2024 14:58
-
-
Save aklinkert/ed2f33d7249442032312334c6f29726e to your computer and use it in GitHub Desktop.
Bash script to recursively check uncommitted changes in a directory tree.
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
#!/usr/bin/env bash | |
cwd="$(pwd)" | |
find . -print0 -type d | while IFS= read -r -d '' file; do | |
if [ ! -d "${file}/.git" ]; then | |
continue | |
fi | |
cd "${file}" | |
if [[ -n $(git status -s) ]]; then | |
echo "Repo ${file} has modified/untracked changes" | |
fi | |
cd "${cwd}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is gold, thank you!