I guess that the "git" command is streaming a stack of terminal control characters to change colours on the screen as well as the real data output. By piping the output through grep, you'll potentially be stripping those characters out of the stream going to the terminal. Can't see an easy solution!