Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I search for a commit message on GitHub?

Tags:

github

search

Not in a Git repository, but rather in GitHub specifically - how do I search just the commit messages of a specific repository/branch?

like image 311
ripper234 Avatar asked Aug 08 '13 09:08

ripper234


People also ask

Can we search a commit in GitHub?

You can search for commits on GitHub and narrow the results using these commit search qualifiers in any combination. You can search for commits globally across all of GitHub, or search for commits within a particular repository or organization.

Where do I find commits in GitHub?

On GitHub.com, navigate to the main page of the repository. On the main page of the repository, click the commits to navigate to the commits page. Navigate to the commit by clicking the commit message link. To see what branch the commit is on, check the label below the commit message.

How can I see commit commit message?

To find a git commit id/hash by a full or partial commit message, you can use the git log command with the --grep=<pattern> option (where the " pattern " is a regular expression pattern).

How do I see all commit messages in git?

On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.


1 Answers

You used to be able to do this, but GitHub removed this feature at some point mid-2013. To achieve this locally, you can do:

git log -g --grep=STRING 

(Use the -g flag if you want to search other branches and dangling commits.)

-g, --walk-reflogs     Instead of walking the commit ancestry chain, walk reflog entries from     the most recent one to older ones. 
like image 159
dsldsl Avatar answered Sep 21 '22 20:09

dsldsl