Search code and set email hooks in Github

August 2nd, 2012 - Madrid

Two useful tricks that I didn’t know I could do: The first if that you can search code for a repo that doesn’t belong to you (oddly enough, github features a nice search code box when you browse your own repositories but not for the others (not even for the ones you forked)).

It’s not a secret feature but it did go unnoticed for me until recently, in advanced search you can select to search for code and specify the search string and repo that interests you, for example. I wannted to search “/tmp/vagrant-network-interfaces” in the mitchellh/vagrant repo

/tmp/vagrant-network-interfaces repo:mitchellh/vagrant


The other useful trick is to set a email service hook in your repository’s admin settings to get an email everything someone pushes to a branch (click on the email service hook, setup the email address and as silly as it sounds, don’t forget to click on “active” ;)