Skip to content

Instantly share code, notes, and snippets.

@erikerlandson
Created May 5, 2014 23:27
Show Gist options
  • Save erikerlandson/d5137475672cd277f9bd to your computer and use it in GitHub Desktop.
Save erikerlandson/d5137475672cd277f9bd to your computer and use it in GitHub Desktop.
A find command that identifies directory names housing a git repo
[eje@localhost git]$ for dir in `find /home/eje/git -maxdepth 3 -exec test -d \{\}/.git \; -print` ; do echo $dir; cd $dir ; git reset --hard HEAD; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment