
How to search for a commit message in GitHub? - nkurz
http://stackoverflow.com/questions/18122628/how-to-search-for-a-commit-message-in-github
======
nkurz
I post this because I was astonished to find that GitHub did not provide a way
to search commit messages. I was even more astonished to find that they once
had supported this seemingly essential search but no longer do. Even with
"billions" of commits across the entire site, this doesn't seem like a
particularly difficult task, since the searches typically are restricted to a
particular project.

So instead of dealing with a single very large, very rapidly changing index,
one can reduce the problem to maintaining a large number of small to medium
size indexes, most of which change very slowly. Is this somehow more difficult
than it seems? Or perhaps an opportunity for a third party to step in and
provide a useful service that GitHub might be wise to acquire?

~~~
kodablah
For the record, BitBucket (and the on-premises equivalent, Stash) offer even
less searching.

I do believe advanced code searching across repositories could be a viable
product (e.g. like FishEye which offers really advanced searching) but I
struggle to see how it could be monetized.

~~~
bpicolo
Fwiw, I think BitBucket is slow in this regard (according to the ticket)
because they're worried you can just search AWS keys up that were accidentally
committed (which has historically been an issue on github)

------
codinghorror
This is such a pain in the butt for us on a weekly basis. Being able to search
commit messages would make my life a lot easier.

~~~
yonasb
I use SourceTree almost exclusively for this feature. They allow you to search
any commit message in a repo. Such a hidden gem.

------
jordigh
My preferred method, if the needle is really deep in the gitstack, clone with
hg-git and use revsets:

[https://selenic.com/hg/help/revsets](https://selenic.com/hg/help/revsets)

Any hgweb instance allows revsets, e.g.

[http://lists.gnu.org/archive/html/octave-
maintainers/2014-02...](http://lists.gnu.org/archive/html/octave-
maintainers/2014-02/msg00121.html)

------
acosmism
the simplest way is "git --no-pager" log | grep "the message you are looking
for"

~~~
khc
or just git log --grep "the message you are looking for"? But that doesn't
solve the problem of multiple repositories though.

