Skip to content

Instantly share code, notes, and snippets.

@sryze
Created November 14, 2020 07:04
Show Gist options
  • Select an option

  • Save sryze/67f81d02021b626bfdc399db7b19e0ed to your computer and use it in GitHub Desktop.

Select an option

Save sryze/67f81d02021b626bfdc399db7b19e0ed to your computer and use it in GitHub Desktop.
Find Git repos and check if they are broken
#!/bin/sh
find $1 -name .git -type d -exec sh -c 'echo $(realpath {}/..); cd {}/..; git status > /dev/null' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment