Commit a3750689 authored by nimrod's avatar nimrod
Browse files

Git uncommitted alias and script.

parent 5c270661
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    merg = merge --no-edit
    pop = stash pop
    posh = push --set-upstream origin HEAD
    pre-commit = ! pre-commit run --files $(git diff --name-only) $(git diff --cached --name-only)
    pre-commit = ! pre-commit run --files $(git uncommitted)
    Pull = pull --progress --ff --tags
    pull-force = !git fetch && git reset --hard "$(git tracking)"
    pushes = !git remote | xargs -n1 git push
+5 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

git diff --name-only
git diff --name-only --cached
+7 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

# shellcheck disable=SC2016
find ~/Repositories -maxdepth 5 -name .git -type d -print0 |
    xargs --null dirname --zero |
    xargs --null --replace /bin/sh -c 'f () { [ -z "$(git -C "$1" uncommitted)" -o -z "$(git -C "$1" remote -v)" ] || echo "$1"; }; f '\''{}'\'''