Created
September 30, 2013 19:11
-
-
Save compwron/6768618 to your computer and use it in GitHub Desktop.
Find all git project src urls in a directory (intended to help me know what is mine and what is not mine, and what to delete)
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
configs = `find . -name config | grep ".git"` | |
configs.split("\n").each{ |config| | |
puts config.gsub("/.git/config", "").gsub("./", "") + `grep "url =" #{config}`.gsub("url =", "") + "\n" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment