Skip to content

Instantly share code, notes, and snippets.

@raogrr
raogrr / git-repo-statuses.sh
Created December 18, 2022 07:01 — forked from Makistos/git-repo-statuses.sh
Get a nice list of git repository statuses using the repo tool. #repo #git #git-status
# Get a list of all the repos
repo forall -c 'echo $REPO_PROJECT; git status -s'
# Just list the changed repos
repo forall -c 'if [ "$(git status --porcelain)" != "" ]; then echo $REPO_PROJECT; fi'
# Print the contents, also only include projects from given list
repo forall $(cat projects) -c 'if [ "$(git status --porcelain)" != "" ]; then echo $REPO_PROJECT; git status -s; fi'
# Check both branch and (un)staged commits