Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If GitHub history search cannot find a commit, first identify which view is missing it: a profile contribution graph, a repository’s commit history, a file’s history, or your local clone. Those views have different scopes. Check the repository and branch, then narrow down path, identity, dates, and pagination; if the commit was removed by a history rewrite, you may need a collaborator’s copy to recover it.

Start with the history view you are searching

A commit can be present in a repository but absent from a particular view. Establish where you expect to see it before changing filters or assuming it has disappeared.

  • Profile contribution graph: Shows qualifying contributions attributed to your GitHub account. It is not a complete list of every commit in a repository.
  • Repository commits page: Shows commits reachable from the selected branch or reference.
  • File history: Shows commits that changed the selected file, not every commit in the repository.
  • Local clone: Shows commits available in your local repository and its fetched references; it may lag behind GitHub or lack commits no longer referenced by a branch.

If a file’s history does not include the commit you need, GitHub’s guidance is to use the repository’s commits page instead: Comparing commits.

Check the repository and branch

Confirm the owner and repository first. Then make sure you are viewing the branch that contains the commit. A commit can exist on a branch other than the default branch, so absence from the default-branch history does not establish that it is absent from the repository.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open the repository’s commits page and select or inspect the branch you expect the commit to be on.
  2. If you have the commit page open, check GitHub’s branch indicators for branches containing that commit. A commit outside the default branch may also be associated with an unmerged pull request. See Comparing commits.
  3. If the branch may have been deleted or force-pushed, open the repository’s activity view and filter by branch, user, period, or activity type. Include force-push events and inspect the changes attached to a relevant event. See Using the activity view to see changes to a repository.

Remove overly narrow filters

Path, author, committer, and date filters can all exclude a real commit if the values do not match what GitHub records. Remove filters one at a time and widen the date range before concluding that results are missing or irrelevant.

  • Path: A file-specific history will not show a commit that did not change that file. Switch to repository history if the commit may have changed another path.
  • Author and committer: These are distinct identities in Git. A commit may have been authored by one person and committed by another, so test each field rather than treating them as interchangeable.
  • Date range: Check whether your start and end dates include the relevant timestamp and timezone. History rewrites can change the committer date without changing the author date.
  • Pagination: A result may be on a later page rather than absent from the result set.

Use the REST API to list commits with explicit scope

For a more controlled check, GitHub’s REST endpoint for listing commits is List commits. Unless you specify a reference, the endpoint starts from the repository’s default branch. The sha parameter selects the branch or SHA to list from; optional filters include file path, author, committer, since, and until.

For example, this request shape specifies a branch, path, author, and date window. It is illustrative; replace the uppercase values and remove filters that may be too restrictive:

GET /repos/OWNER/REPO/commits?sha=BRANCH&path=PATH&author=LOGIN&since=2024-01-01T00:00:00Z&until=2024-02-01T00:00:00Z&per_page=100&page=1

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The endpoint returns 30 commits per page by default and allows up to 100 per page. To check the full result set, follow the response’s pagination links or request subsequent pages. Its date parameters use ISO 8601 timestamps; Git timestamp limits outside 1970-01-01 through 2099-12-31 can produce unexpected results. These details are documented in GitHub’s List commits API reference.

Compare author and committer dates

When a commit was rebased or otherwise rewritten, its author date and committer date may differ. Searching only one day can therefore miss it, even when the date filter looks reasonable.

  1. Run git show <SHA> --pretty=fuller if you have the commit SHA and a local copy.
  2. Compare the output’s AuthorDate and CommitDate.
  3. Search the repository commits page or API around each relevant date, using an appropriate UTC date window and author filter where useful.

GitHub documents this as a troubleshooting method for commits missing from contribution history: Troubleshooting missing contributions.

Distinguish a missing profile contribution from a missing commit

If the commit is visible in repository history but absent from your profile graph, investigate contribution attribution rather than repository search. GitHub’s contribution rules require, among other criteria, that the commit use an email address associated with your account (including an eligible GitHub-provided noreply address), be in a standalone repository rather than a fork, and be on an eligible branch such as the default branch or gh-pages. A newly qualifying contribution may take up to 24 hours to appear.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

GitHub explains the criteria in About your contributions and the checks for missing entries in Troubleshooting missing contributions. To inspect the email recorded on a commit, GitHub’s troubleshooting page describes viewing the commit’s .patch URL.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Refresh a local clone or recover a rewritten commit

If GitHub shows a commit but your local git show <SHA> cannot find it, your clone may be out of date, or the commit may no longer be referenced by a branch. Fetch from the remote that contains the history you need:

git fetch origin

If you are checking the parent of a fork, fetch the appropriate parent remote, often named upstream, instead. Then inspect the relevant remote branch or commit again. GitHub discusses outdated clones and commits no longer referenced by a branch in Troubleshooting missing commits.

If a branch was deleted or force-pushed and the commit is no longer reachable on GitHub, ask a collaborator whether their local repository still contains it. A collaborator who has the commit can create and push a recovery branch. Do not use force-pushing as a routine search fix: it rewrites shared history and can disrupt other contributors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When GitHub search returns unrelated results

There is no documented universal cause for irrelevant results, and GitHub’s documentation does not establish a general rule for web commit-search ranking, indexing delays, or a result cap. Use the predictable history views and explicit filters instead of assuming undocumented search behavior.

  1. Verify the owner, repository, and branch or SHA.
  2. Remove path, author, committer, and date filters one by one.
  3. Switch from file history to repository commits if the target may not have changed the selected file.
  4. For API results, set the intended sha, check the date interval, and retrieve all pages.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.