Skip to content

Instantly share code, notes, and snippets.

@organom
Created October 4, 2023 18:43
Show Gist options
  • Save organom/6d03abed1e44a84fd3d24bdc47462f2e to your computer and use it in GitHub Desktop.
Save organom/6d03abed1e44a84fd3d24bdc47462f2e to your computer and use it in GitHub Desktop.
Recursivelly display the status of all git repositories in a folder
!#/bin/bash
function git-status() {
find . -name .git -type d -exec sh -c '(cd {}; cd ..; git_temp=`git status -s`; if [ -n "${git_temp}" ]; then (echo $PWD && git status -s && echo); fi;)' \;
}
git-status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment