grep - Skip git commits with a specific string using git log -


i take latest 5 commits using git log not contain specific string, example "merge branch".

i tried several options, none of them worked. e.g.:

 git log -n 5 --grep="merge branch" --invert-grep  git log -n 5 -v --grep="merge branch"  git log -n 5 --not --grep="merge branch" 

it seems --invert-grep job doesn't work (http://git-scm.com/docs/git-log)

if you're trying non-merge-commits, can use:

git log -n 5 --no-merges 

this will, of course, skip merge commits don't contain "merge branch" in log message.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -