Skip to main content
RapidDev - Software Development Agency
github-for-non-tech

How to Check Which Files Were Changed in a GitHub Commit

To see which files were changed in a commit, go to your repository's Commits list, click on any commit message or hash, and GitHub shows you the full file list with green additions and red deletions. Each modified file appears with a summary showing how many lines were added or removed. This is the fastest way to understand what an AI tool or developer changed in a single save point.

What you'll learn

  • How to open a commit and see its file list
  • How to read the additions and deletions summary
  • What the green and red highlighting means
  • How to navigate between changed files in a commit
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner6 min read5 minutesGitHub.com (Free, Pro, Team, Enterprise) — all plansMarch 2026RapidDev Engineering Team
TL;DR

To see which files were changed in a commit, go to your repository's Commits list, click on any commit message or hash, and GitHub shows you the full file list with green additions and red deletions. Each modified file appears with a summary showing how many lines were added or removed. This is the fastest way to understand what an AI tool or developer changed in a single save point.

Every Commit Lists Exactly Which Files It Touched

When someone — or an AI tool like Lovable, Cursor, or Replit — saves changes to your GitHub project, the commit records exactly which files were modified, added, or deleted. This information is always available on GitHub. Click any commit to see a file-by-file breakdown of what changed. Each file in the list shows a small summary: '+12 -3' means 12 lines were added and 3 lines were removed. Files that were newly created show only additions (green). Files that were deleted show only removals (red). Files that were modified show a mix of both. This is invaluable for debugging. If your app broke after a recent change, checking which files were touched in the last few commits tells you exactly where to look. You do not need to understand the code itself — just knowing which files changed narrows down the problem significantly.

Prerequisites

  • A free GitHub account at github.com
  • A repository with at least one commit that modified multiple files

Step-by-step guide

1

Open the commits list

Navigate to your repository on GitHub. Near the top of the file list, click the clock icon and 'Commits' link (for example, '83 Commits'). This opens the list of all commits in reverse chronological order. Each entry shows the commit message, author, and date.

Expected result: You see the full list of commits for your repository.

2

Click on a commit to see its details

Click on the commit message text (the blue linked text) or click the short hash code on the right side of any commit. Both take you to the same commit detail page. At the top, GitHub displays a summary bar showing: 'Showing X changed files with Y additions and Z deletions.' Below that, you see a list of every file that was modified, added, or deleted in this commit.

Expected result: You see the commit detail page with a list of changed files and their diffs.

3

Read the file change summary

Each file in the commit detail has a header bar showing the file path and a small change count. For example: 'src/pages/Pricing.tsx +45 -12' means 45 lines were added and 12 lines were removed in that file. Look for the colored badges: green numbers indicate additions, red numbers indicate deletions. If a file shows only green, it was newly created. If it shows only red, it was deleted. A file with both colors was modified.

Expected result: You can see how many lines were added and removed in each file.

4

Navigate between changed files

If the commit modified many files, GitHub shows a file tree or table of contents at the top of the diff. Click any filename in this list to jump directly to that file's changes. On larger commits, this saves you from scrolling through hundreds of lines. You can also use the 'File filter' search box (if visible) to search for a specific filename. This is especially useful when AI tools like Lovable make broad changes across many components in a single commit.

Expected result: You can jump between different changed files without scrolling through the entire commit.

5

Understand added, modified, and deleted files

In the file list, GitHub uses labels to indicate the type of change. A file labeled 'NEW' or showing a green icon was created by this commit. A file labeled 'DELETED' or showing a red icon was removed. Files with no special label were modified — some lines changed but the file still exists. Pay attention to file paths: if you see changes in 'src/pages/' those are page-level changes. Changes in 'src/components/' affect reusable UI elements. Changes in 'supabase/' or 'api/' affect backend functionality.

Expected result: You can identify whether each file was added, modified, or deleted.

Complete working example

reading-commit-files.md
1# Reading a Commit's File List
2
3## Summary bar at the top:
4"Showing 5 changed files with 87 additions and 23 deletions"
5
6## File list breakdown:
7
8src/pages/Pricing.tsx +45 -0 (NEW file created)
9src/components/PriceCard.tsx +30 -0 (NEW file created)
10src/components/Navbar.tsx +5 -3 (MODIFIED small update)
11src/App.tsx +7 -2 (MODIFIED added route)
12package.json +0 -18 (MODIFIED removed deps)
13
14## What the numbers mean:
15- +45 -0 = 45 lines added, 0 removed (new file)
16- +5 -3 = 5 lines added, 3 removed (edited file)
17- +0 -18 = 0 lines added, 18 removed (content deleted)
18
19## Color coding:
20- Green background = added lines
21- Red background = removed lines
22- No background = unchanged context lines

Common mistakes when checkking Which Files Were Changed in a GitHub Commit

Why it's a problem: Only reading the commit message without checking the files

How to avoid: Always click into the commit to see which files were actually changed. The message might say 'Fix pricing' but the commit could touch files you did not expect.

Why it's a problem: Assuming a small line count means a small change

How to avoid: Even a '+1 -1' change can be significant — like changing an API key, a price, or a redirect URL. Read the actual diff, not just the numbers.

Why it's a problem: Ignoring changes to config files like package.json

How to avoid: Config file changes can add or remove dependencies, change build settings, or alter environment variables. These often have outsized impact.

Best practices

  • Check which files changed before approving a pull request — do not rely solely on the commit message.
  • Pay special attention to changes in config files (package.json, .env, tsconfig) as they affect the entire project.
  • Use the file jump navigation on large commits to find the specific file you care about.
  • When debugging, compare the file list of the last few commits against the file where the bug appears.
  • Look for unexpected file changes — if a commit that should only touch the pricing page also modifies auth files, investigate.
  • Share commit URLs with teammates when discussing specific changes — each commit has a permanent link.

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I am looking at a GitHub commit that shows 12 changed files. Explain to me how to read the file list, what the green and red numbers mean, and how to figure out which files are most important to review.

Frequently asked questions

Can I see which files changed without understanding the code?

Yes. The file names and paths tell you a lot even without reading code. Files in 'src/pages/' are pages, files in 'src/components/' are UI elements, and files like 'package.json' are configuration. The line count summary tells you how much changed.

What does it mean when a file shows only red deletions?

The file was either deleted entirely or had lines removed without any additions. If the entire file is red, it was deleted from the project in that commit.

Can AI tools change files I did not ask them to change?

Yes. AI tools like Lovable and Cursor sometimes modify related files when fulfilling a request. For example, asking to 'add a pricing page' might also modify App.tsx (to add the route) and Navbar.tsx (to add a navigation link). Always review the full file list.

How do I share a specific commit with someone?

Click on the commit to open its detail page, then copy the URL from your browser. This URL is permanent and shows the exact same file list and diff to anyone with access to the repository.

Is there a way to see file changes across multiple commits at once?

Yes. Pull requests show the combined changes of all their commits. Open a PR and scroll down to see the cumulative file list and diff.

Can RapidDev help me review AI-generated commits?

Yes. RapidDev can audit commits from AI tools like Lovable or Cursor, identify unexpected changes, and ensure code quality — giving non-technical founders confidence in what is being built.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.