Skip to content

Instantly share code, notes, and snippets.

@hsribei
Created May 13, 2009 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsribei/111188 to your computer and use it in GitHub Desktop.
Save hsribei/111188 to your computer and use it in GitHub Desktop.
# Grep a line in a project's entire network
# (or all the forks you included as remote anyway)
irb(main):001:0> pattern = "task :clear"
irb(main):002:0> `find .git/refs/remotes/ -type f`.split("\n").map{|e| e.gsub(/\.git\/refs\/remotes\//, '')}.each {|e| puts `git grep #{pattern} #{e}`}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment