Search commits but remove results from forks?

I’m using https://help.github.com/articles/searching-commits/ to try get generate a nice overview of all my open-source contributions.

But because of _forking_, many of the commits are duplicated on multiple repos. So they show up in the results multiple times. Example:

https://github.com/search?o=desc&p=3&q=author-email%3Aharaldnordgren%40gmail.com+is%3Apublic±user%3AHaraldNordgren±user%3Agifflarn±user%3Aeveryonehelp±user%3Adatateknik-lth±user%3ACantemo±user%3Abetalo-sweden&s=committer-date&type=Commits

Is it possible to filter commits by applying a uniqueness constraint on the commit hash. Or an option to remove forked repos?

Hey there @haraldnordgren, help’s arrived.

Yikes, that doesn’t sound right. GitHub is meant to ignore forks from search results by default, so it might be worth contacting the folks at GitHub know this is happening. You can get in touch with them here: https://github.com/contact.

In the meantime, you can always use the  fork:false  flag to exclude forked results in search :slight_smile: There’s also some more info on searching here: https://help.github.com/articles/searching-code/

Let me know if this works for you!

2 Likes