title: Regex for grepping exact phrase in git log
body: <p>Currently, I am working on mining software repository in <code>github</code>. I use the <code>git log command</code> to get the commit logs. But when I only need to find the commit logs contain a specific word, some unexpected logs also have shown.</p>
  
  <p>For example, I need the commit log contains word <code>HBASE-792</code>. I used command <code>git log --grep='HBASE-792' --oneline</code>. But these logs have shown:</p>
  
  <pre><code>HBASE-7921. TestHFileBlock.testGzipCompression should ignore the block checksum
  HBASE-7923 force unassign can confirm region online on any RS to get rid of double assignments
  HBASE-7928 Scanning .META. with startRow and/or stopRow is not giving proper results; REVERT.  NEEDS SOME MORE WORK
  Fix overlogging; part of HBASE-792 patch
  Patches to alleviate HBASE-790 and HBASE-792
  </code></pre>
  
  <p>What I need are only the last 2 commit logs which exactly contain <code>HBASE-792</code>. What pattern should I write in grep?</p>