Last active
February 22, 2020 04:47
-
-
Save Jahhein/39f21cd2fe185209bbafbd413132e2a9 to your computer and use it in GitHub Desktop.
Find all repositories under a directory.
This file contains hidden or 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
| #!/bin/bash | |
| cat << EOF | |
| 1) find "$1" -name \"^.git$\" -print | |
| 2) gfind "$1" -name \"^.git$\" -print | |
| 3) sudo fd --hidden --no-ignore --type directory \"^.git$\" "$1" | |
| pick one you can use. | |
| ## EXAMPLE | |
| sudo fd --hidden --no-ignore --type directory \"^.git$\" ~/Unorganized-stuff >> ~/Desktop/repos-list.txt | |
| EOF | |
| exit 0 |
This file contains hidden or 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
| #!/bin/bash | |
| # Lists all .git directories (repos) found in directory arg $1 | |
| sudo fd --hidden --no-ignore --type directory "^.git$" "$1" | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment