I'm new to git hooks. I'm not able to understand below pre-commit hook. Can anyone tell me how this works please.Here my doubt is how grep will be happened in committed files as we are not taking those files anywhere. Sorry if am asking wrong question but please help me in understanding git hooks..
#!/usr/bin/env ruby
if `grep -rls "require 'ruby-debug'; raise" *` != ""
puts "You twit, you've left a debugger in!"
exit(1)
end