Created
May 5, 2014 23:27
-
-
Save erikerlandson/d5137475672cd277f9bd to your computer and use it in GitHub Desktop.
A find command that identifies directory names housing a git repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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