Skip to content

Instantly share code, notes, and snippets.

View aklinkert's full-sized avatar

Alex Klinkert aklinkert

  • Hamburg
View GitHub Profile
@aklinkert
aklinkert / check-git-uncommitted-changes.sh
Last active July 19, 2022 08:52
Bash script to recursively check uncommitted changes in a directory tree.
#!/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