Quick git Commit Searching

By  on  

While I love GitHub for the way it presents git repository information to me, I've been trying hard not to rely so much on GUI web apps and desktop apps, instead looking to use command line equivalents.  You see that in my recent shell posts, including Tweet from Command Line with tHow to Watermark Images and VideosAccess Mac Camera by Command Line, and more.  The command line is magic™!

One frequent git task is searching a list of commits on master branch which match a given keyword.  Here's how I do that:

git log -i --grep='ckeditor'

In the command above, I'm searching the commit log for commits and/or authors that relate to CKEditor, a component of MDN that I frequently update.  A sample result would look like:

commit 1d5dfd86633488873326774819c0e7b362fadfb0
Merge: 84a271c 4f0a7e3
Author: John Karahalis <redacted@gmail.com>
Date:   Thu Aug 20 15:59:37 2015 -0400

    Merge pull request #3425 from darkwing/1196252-ckeditor

    fix bug 1196252 - Upgrade CKEditor to 4.5.3

commit 4f0a7e3602058079bdc9ab7fad3cfd0513596045
Author: David Walsh <redacted@gmail.com>
Date:   Wed Aug 19 09:49:34 2015 -0500

    fix bug 1196252 - Upgrade CKEditor to 4.5.3

commit 4e55f36f58a1f792bd8869c2c97cecb2951e5afa
Merge: 57a7c2a cda134e
Author: luke crouch <redacted@gmail.com>
Date:   Thu Jul 2 13:15:33 2015 -0500

    Merge pull request #3302 from darkwing/975868-ckeditor-upgrade-2

    Bug 975868 - Upgrade CKEditor to 4.4.8

:

I love being able to see this result quickly within the command line instead of having to open my browser, navigate to GitHub, use their search, etc.  We all know git is super powerful -- we should aim to use each feature!

Recent Features

  • By
    CSS vs. JS Animation: Which is Faster?

    How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...

  • By
    Create a CSS Flipping Animation

    CSS animations are a lot of fun; the beauty of them is that through many simple properties, you can create anything from an elegant fade in to a WTF-Pixar-would-be-proud effect. One CSS effect somewhere in between is the CSS flip effect, whereby there's...

Incredible Demos

  • By
    Create a Context Menu with Dojo and Dijit

    Context menus, used in the right type of web application, can be invaluable.  They provide shortcut methods to different functionality within the application and, with just a right click, they are readily available.  Dojo's Dijit frameworks provides an easy way to create stylish, flexible context...

  • By
    WebKit Marquee CSS:  Bringin&#8217; Sexy Back

    We all joke about the days of Web yesteryear.  You remember them:  stupid animated GIFs (flames and "coming soon" images, most notably), lame counters, guestbooks, applets, etc.  Another "feature" we thought we had gotten rid of was the marquee.  The marquee was a rudimentary, javascript-like...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!