Assuming you're talking about the commit message and not the notes, you don't want to use %N
. Perhaps %s
would be better, or %s %b
. That's up to you. Also, make sure you single or double quote the --pretty
flag so it's not split into two arguments
git log "--pretty=format:%H %s" --grep=mysearchtext