Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
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 }}
Uh oh!
There was an error while loading.
Please reload this page
.
pre-commit
/
pre-commit
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
1k
Star
15.5k
Code
Issues
18
Pull requests
8
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Commits
Breadcrumbs
History for
pre-commit
pre_commit
git.py
on
main
User selector
All users
All time
Commit history
Commits on Jul 21, 2026
avoid duplicate files in --all-files during conflict
asottile
committed
8a1c47a
View commit details
Copy full SHA for 8a1c47a
View code at this point
Browse repository at this point
Commits on Oct 16, 2025
fix deprecated call
asottile
committed
ddfcf40
View commit details
Copy full SHA for ddfcf40
View code at this point
Browse repository at this point
Commits on Mar 15, 2025
fix: crash on ambiguous ref 'HEAD'
tusharsadhwani
authored and
asottile
committed
b7eb412
View commit details
Copy full SHA for b7eb412
View code at this point
Browse repository at this point
Commits on Oct 28, 2023
python3.9+
asottile
committed
7f15dc7
View commit details
Copy full SHA for 7f15dc7
View code at this point
Browse repository at this point
Commits on Jan 2, 2023
Remove `GOPATH` special build
taoufik07
authored and
asottile
committed
60a42e9
View commit details
Copy full SHA for 60a42e9
View code at this point
Browse repository at this point
Commits on Nov 11, 2022
Add `--no-ext-diff` to `git diff` call
m-rsha
committed
4399c2d
View commit details
Copy full SHA for 4399c2d
View code at this point
Browse repository at this point
Commits on Nov 2, 2022
Change `intent_to_add_files` from using `git status` to `git diff`
m-rsha
committed
4bca29e
View commit details
Copy full SHA for 4bca29e
View code at this point
Browse repository at this point
Commits on Oct 30, 2022
Change `cmd_output_b`s `retcode` arg to a boolean `check`
marsha
committed
84b38f7
View commit details
Copy full SHA for 84b38f7
View code at this point
Browse repository at this point
Commits on Oct 27, 2022
add GIT_ASKPASS as a passthrough env var
Show description for 8ebb7ae
mattp-
committed
8ebb7ae
View commit details
Copy full SHA for 8ebb7ae
View code at this point
Browse repository at this point
Commits on Oct 22, 2022
fix tests for submodules for CVE-2022-39253
asottile
committed
bc96b0b
View commit details
Copy full SHA for bc96b0b
View code at this point
Browse repository at this point
Commits on Apr 2, 2022
Split get_git_dir() into get_git_dir() and get_git_common_dir()
Show description for ba132f0
daschuer
authored and
asottile
committed
ba132f0
View commit details
Copy full SHA for ba132f0
View code at this point
Browse repository at this point
Commits on Mar 31, 2022
Pick a tag if multiple tags exist on a SHA.
Show description for e8b46c1
mblayman
authored and
asottile
committed
e8b46c1
View commit details
Copy full SHA for e8b46c1
View code at this point
Browse repository at this point
Commits on Mar 4, 2022
GIT_HTTP_PROXY_AUTHMETHOD kept in env variables
vincentberthier
authored
07f4415
View commit details
Copy full SHA for 07f4415
View code at this point
Browse repository at this point
Commits on Jan 18, 2022
drop python 3.6 support
Show description for 04de6a2
asottile
committed
04de6a2
View commit details
Copy full SHA for 04de6a2
View code at this point
Browse repository at this point
Commits on Nov 23, 2021
support gitconfig from env
Show description for 4eb91cd
emzeat
authored and
asottile
committed
4eb91cd
View commit details
Copy full SHA for 4eb91cd
View code at this point
Browse repository at this point
Commits on Sep 14, 2021
fix pre-commit autoupdate for core.useBuiltinFSMonitor=true on windows
asottile
committed
ab94dd6
View commit details
Copy full SHA for ab94dd6
View code at this point
Browse repository at this point
Commits on Aug 10, 2021
fall back to full diff on disparate histories
asottile
committed
0fe959d
View commit details
Copy full SHA for 0fe959d
View code at this point
Browse repository at this point
Commits on Feb 24, 2021
Fix pre-commit install on subst drives
asottile
committed
f9fbe18
View commit details
Copy full SHA for f9fbe18
View code at this point
Browse repository at this point
Commits on Jan 27, 2021
fix execution in worktrees in subdirectories of bare repositories
asottile
committed
f75fc6b
View commit details
Copy full SHA for f75fc6b
View code at this point
Browse repository at this point
Commits on Dec 7, 2020
git: changed rev-parse option for Git 2.25 changes to --show-toplevel
Show description for 29d15de
mrogaski
authored and
asottile
committed
29d15de
View commit details
Copy full SHA for 29d15de
View code at this point
Browse repository at this point
Commits on Nov 28, 2020
don't crash on cygwin mismatch check
asottile
committed
8cfe8e5
View commit details
Copy full SHA for 8cfe8e5
View code at this point
Browse repository at this point
Commits on Nov 20, 2020
Improve performance by ignoring submodules
Show description for 120d602
Michael Vincent
committed
120d602
View commit details
Copy full SHA for 120d602
View code at this point
Browse repository at this point
Commits on Oct 28, 2020
Replace EnvironT with MutableMapping[str, str]
asottile
committed
24dfeed
View commit details
Copy full SHA for 24dfeed
View code at this point
Browse repository at this point
Commits on Sep 20, 2020
check cygwin mismatch earlier
asottile
committed
91530f1
View commit details
Copy full SHA for 91530f1
View code at this point
Browse repository at this point
Commits on Jun 9, 2020
prevent infinite recursion of post-checkout on clone
asottile
committed
6ee9e13
View commit details
Copy full SHA for 6ee9e13
View code at this point
Browse repository at this point
Commits on Feb 23, 2020
Make more readable --from-ref / --to-ref aliases for --source / --origin
asottile
committed
d35b003
View commit details
Copy full SHA for d35b003
View code at this point
Browse repository at this point
Commits on Jan 21, 2020
exclude GIT_SSL_NO_VERIFY env variable from getting stripped
schiermike
authored and
asottile
committed
d9800ad
View commit details
Copy full SHA for d9800ad
View code at this point
Browse repository at this point
Commits on Jan 13, 2020
More miscellaneous cleanup
asottile
committed
df40e86
View commit details
Copy full SHA for df40e86
View code at this point
Browse repository at this point
Commits on Jan 12, 2020
Some manual .format() -> f-strings
asottile
committed
9000e9d
View commit details
Copy full SHA for 9000e9d
View code at this point
Browse repository at this point
Clean up calls to .encode() / .decode()
asottile
committed
aefbe71
View commit details
Copy full SHA for aefbe71
View code at this point
Browse repository at this point
Add types to pre-commit
asottile
committed
327ed92
View commit details
Copy full SHA for 327ed92
View code at this point
Browse repository at this point
upgrade hooks, pyupgrade pre-commit
asottile
committed
30c1e82
View commit details
Copy full SHA for 30c1e82
View code at this point
Browse repository at this point
Commits on Dec 30, 2019
Allow try-repo to work on bare repositories
asottile
committed
968b2fd
View commit details
Copy full SHA for 968b2fd
View code at this point
Browse repository at this point
Commits on Dec 26, 2019
Add GIT_SSL_CAINFO environment variable to whitelist.
Show description for 8c93896
Ivan Gankevich
committed
8c93896
View commit details
Copy full SHA for 8c93896
View code at this point
Browse repository at this point
Commits on Oct 6, 2019
Split out cmd_output_b
asottile
committed
f612aeb
View commit details
Copy full SHA for f612aeb
View code at this point
Browse repository at this point
Previous
Next
You can’t perform that action at this time.