Commit e237cf49 authored by nimrod's avatar nimrod
Browse files

find-uncommitted script.

List repositories that have uncommitted files or have no remote (so it
haven't been pushed). Repositories that have WIP and it's local only.
parent 6ae234d0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

# shellcheck disable=SC2044
for repo in $(find "$HOME/Repositories" -maxdepth 7 -type d -name .git -exec dirname {} \;)
do
    [ "$(git -C "$repo" stat | wc -l)" -gt '1' ] || continue
    [ "$(git -C "$repo" remote show | wc -l)" -gt 0 ] || continue
    echo "$repo"
done