Book Image

Git Version Control Cookbook

Book Image

Git Version Control Cookbook

Overview of this book

Table of Contents (19 chapters)
Git Version Control Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Grepping the commit messages


Now we know how to list and sort files that we make frequent changes to and vice versa, but we are also interested in finding out the bugs we are fixing, the features we are implementing, and perhaps who is signing the code. All this information is usually available in the commit message. Some companies have a policy that you need to have a referral to a bug, a feature, or some other reference in the commit message. By having this information in the commit message, it is a lot easier to produce a nice release note as well.

Getting ready

As we will mostly be grepping the Git database in these examples, we really don't need to check something out or be at a specific commit for this example. So, if you are still lurking around in the chapter6 folder, we can continue.

How to do it...

Let's see how many commits in the repository are referring to a bug:

  1. First of all, we need to know the pattern for bugs referred to in the commit messages. I did this by looking in the commits...