By default, git grep searches in all tracked files in your working tree. This is the key difference between the standard grep ...
I'm fairly new to git and most of my interaction with it has been via the IntelliJ Idea IDE. But sometimes I use a command line. In one directory I did "git init", "git add files", and "git commit".