GitHub7 min readMarch 10, 2026

How to See Commit History on GitHub

Step-by-step guide to viewing, searching, and navigating commit history on GitHub — in the web UI, API, and CLI.

View Commits in the GitHub Web UI

The simplest way to see commit history on GitHub is through the web interface. Navigate to any repository and click the clock icon or the "N commits" link near the top of the file list.

  • Go to the repository page on github.com
  • Click the commit count (e.g., "142 commits") above the file list
  • Browse commits in reverse chronological order
  • Click any commit to see its full diff

You can also switch branches using the branch dropdown before viewing commits. The URL follows the pattern github.com/owner/repo/commits/branch-name.

View Commit History for a Specific File

Navigate to any file on GitHub and click the "History" button in the top-right corner. This shows every commit that modified that specific file.

For a line-by-line breakdown of who last changed each line, click the "Blame" button instead. This is GitHub's equivalent of git blame.

Search Commits on GitHub

GitHub's commit search supports filtering by author, date, and message content. Use the search bar on the commits page or GitHub's global search with the type:commits qualifier.

# Search commit messages in a repo
https://github.com/owner/repo/commits?query=fix+auth

# Global search for commits by author
author:janedoe type:commits "refactor"

View History with the GitHub CLI

The gh CLI lets you browse commits without leaving the terminal. Install it with brew install gh (macOS) or via your system package manager.

# List recent commits
gh api repos/owner/repo/commits --jq ".[].commit.message"

# View a specific commit
gh api repos/owner/repo/commits/abc1234

Fetch Commit History via the GitHub API

The GitHub REST API returns commit data as JSON, making it easy to build dashboards and reports. The /commits endpoint supports author, since, until, and path filters.

# List commits with curl
curl -s "https://api.github.com/repos/owner/repo/commits?per_page=5" \
  | jq ".[].commit | {message, date: .author.date}"

# Filter by author and date
curl -s "https://api.github.com/repos/owner/repo/commits?author=jane&since=2026-01-01T00:00:00Z"

Building on this API is exactly how tools like Git Progress aggregate your commit history across all your GitHub, GitLab, and Bitbucket repositories into a single dashboard.

Stop running git log manually

Git Progress aggregates your commit history across GitHub, GitLab, and Bitbucket into beautiful dashboards. Free for individual developers.

Get Started Free