Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
galamdring
github-cli
Repository navigation
Code
Issues
1
(1)
Pull requests
6
(6)
Actions
Projects
Security and quality
Insights
More
items
Commits
Breadcrumbs
History for
github-cli
pkg
cmd
pr
diff
diff.go
on
main
User selector
All users
Datepicker
All time
Commit history
Commits on Sep 2, 2026
Let callers set headers on a shared client request
Show description for 6fcf2ea
williammartin
and
Copilot
committed
6fcf2ea
View commit details
Copy full SHA for 6fcf2ea
View code at this point
Browse repository at this point
Commits on Jul 31, 2026
Merge commit from fork
Show description for 0c2eea6
3 people
authored
0c2eea6
View commit details
Copy full SHA for 0c2eea6
View code at this point
Browse repository at this point
Merge commit from fork
Show description for 2a1409f
BagToad
and
Copilot
authored
2a1409f
View commit details
Copy full SHA for 2a1409f
View code at this point
Browse repository at this point
Commits on Jul 22, 2026
chore(typos): fix typos in code and documentation
pstoeckle
committed
0492fd1
View commit details
Copy full SHA for 0492fd1
View code at this point
Browse repository at this point
Commits on Mar 9, 2026
Merge branch 'trunk' into feature/pr-diff-exclude
yuvrajangadsingh
authored
78891fc
View commit details
Copy full SHA for 78891fc
View code at this point
Browse repository at this point
refactor: change extractFileName param from []byte to string
yuvrajangadsingh
committed
ea83ca0
View commit details
Copy full SHA for ea83ca0
View code at this point
Browse repository at this point
Commits on Mar 6, 2026
fix: align example indentation with codebase convention
yuvrajangadsingh
committed
a331ef7
View commit details
Copy full SHA for a331ef7
View code at this point
Browse repository at this point
fix: address review feedback for --exclude flag
Show description for d7f1d8e
yuvrajangadsingh
committed
d7f1d8e
View commit details
Copy full SHA for d7f1d8e
View code at this point
Browse repository at this point
fix: share diffHeaderRegexp between changedFilesNames and extractFileName, fix gofmt
yuvrajangadsingh
committed
8bd48af
View commit details
Copy full SHA for 8bd48af
View code at this point
Browse repository at this point
feat(pr diff): add --exclude flag to filter files from diff output
Show description for 18536dc
yuvrajangadsingh
committed
18536dc
View commit details
Copy full SHA for 18536dc
View code at this point
Browse repository at this point
Commits on Feb 19, 2026
Fix invalid ANSI SGR escape code in JSON and diff colorization
Show description for 48951ac
BagToad
and
Copilot
committed
48951ac
View commit details
Copy full SHA for 48951ac
View code at this point
Browse repository at this point
Commits on May 23, 2024
Add comment to pr diff regex
williammartin
committed
a66a646
View commit details
Copy full SHA for a66a646
View code at this point
Browse repository at this point
Update regex in changedFilesNames to handle quoted paths
go-katsuhiko-anda
committed
e5e5c4f
View commit details
Copy full SHA for e5e5c4f
View code at this point
Browse repository at this point
Commits on Nov 16, 2023
Wrap cli flags in backticks uniformly
muzimuzhi
committed
17d336e
View commit details
Copy full SHA for 17d336e
View code at this point
Browse repository at this point
Commits on Mar 8, 2023
pr diff: sanitize control characters for terminal output
mislav
committed
32afc5d
View commit details
Copy full SHA for 32afc5d
View code at this point
Browse repository at this point
Commits on Oct 18, 2022
add `--web` flag to `pr diff` command (#6439)
ffalor
authored
e7270e4
View commit details
Copy full SHA for e7270e4
View code at this point
Browse repository at this point
Commits on Aug 14, 2022
Add name-only flag to `gh pr diff` sub command
vbh
committed
7036d05
View commit details
Copy full SHA for 7036d05
View code at this point
Browse repository at this point
Commits on Feb 18, 2022
Use StringEnumFlag helper in more places
mislav
committed
19563c4
View commit details
Copy full SHA for 19563c4
View code at this point
Browse repository at this point
Commits on Feb 10, 2022
Ignore EPIPE errors when writing to a closed pager
Show description for 0a5e220
mislav
committed
0a5e220
View commit details
Copy full SHA for 0a5e220
View code at this point
Browse repository at this point
Commits on Feb 1, 2022
Standardize pager output across commands (#5141)
Show description for 4a3ef50
mislav
authored
4a3ef50
View commit details
Copy full SHA for 4a3ef50
View code at this point
Browse repository at this point
Commits on Dec 1, 2021
pr diff: support very long lines
mislav
committed
c33eb3b
View commit details
Copy full SHA for c33eb3b
View code at this point
Browse repository at this point
pr diff: respect global NO_COLOR/CLICOLOR_FORCE settings
Show description for 4a6aa0e
mislav
committed
4a6aa0e
View commit details
Copy full SHA for 4a6aa0e
View code at this point
Browse repository at this point
Commits on Oct 21, 2021
Add FlagErrorf; encapsulate FlagError.error
adonovan
committed
f4491c7
View commit details
Copy full SHA for f4491c7
View code at this point
Browse repository at this point
Commits on Oct 8, 2021
Add tests for `pr diff --patch`
mislav
committed
e4c8aa3
View commit details
Copy full SHA for e4c8aa3
View code at this point
Browse repository at this point
Commits on Oct 7, 2021
#2720 | Add patch flag to pull-request diff command
m4ver1k
committed
e0897fd
View commit details
Copy full SHA for e0897fd
View code at this point
Browse repository at this point
Commits on Aug 25, 2021
Rename the module to "github.com/cli/cli/v2"
mislav
committed
11fbb60
View commit details
Copy full SHA for 11fbb60
View code at this point
Browse repository at this point
Commits on Apr 30, 2021
Eliminate API overfetching in `pr` commands
Show description for 9bdc63c
mislav
committed
9bdc63c
View commit details
Copy full SHA for 9bdc63c
View code at this point
Browse repository at this point
Commits on Apr 13, 2021
Add note about current branch detection
cristiand391
committed
8a0d5b0
View commit details
Copy full SHA for 8a0d5b0
View code at this point
Browse repository at this point
Commits on Sep 14, 2020
Ignore EPIPE when forwarding `pr diff` output to pager
mislav
committed
6ad6784
View commit details
Copy full SHA for 6ad6784
View code at this point
Browse repository at this point
Commits on Sep 4, 2020
Add global PAGER support
Show description for d01355e
mislav
committed
d01355e
View commit details
Copy full SHA for d01355e
View code at this point
Browse repository at this point
Commits on Aug 27, 2020
Disallow `pr -R` flag for commands that operate on the current branch
Show description for c21caf5
mislav
committed
c21caf5
View commit details
Copy full SHA for c21caf5
View code at this point
Browse repository at this point
Commits on Aug 17, 2020
Using default pager in gh pr diff
mmontes11
committed
df66a8f
View commit details
Copy full SHA for df66a8f
View code at this point
Browse repository at this point
Commits on Aug 6, 2020
Fix `--repo` override taking effect for `pr` commands
mislav
committed
6490d77
View commit details
Copy full SHA for 6490d77
View code at this point
Browse repository at this point
Commits on Jul 29, 2020
Fix `pr diff` in notty mode
mislav
committed
7949d53
View commit details
Copy full SHA for 7949d53
View code at this point
Browse repository at this point
Isolate `pr diff` command
mislav
committed
af68a74
View commit details
Copy full SHA for af68a74
View code at this point
Browse repository at this point
Loading
You can’t perform that action at this time.