Skip to content

Instantly share code, notes, and snippets.

@compwron
Created September 30, 2013 19:11
Show Gist options
  • Save compwron/6768618 to your computer and use it in GitHub Desktop.
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)
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