That's weird, I have that configuration working on an apache virtualhost:

  ## Redirect rules
  RedirectMatch 404  /\\.git(/.*|$)

http://www.foreclosuredatabank.com/.git