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 }}
sqlcode
git
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Commits
Breadcrumbs
History for
git
templates
hooks--pre-commit.sample
on
master
User selector
All users
Datepicker
All time
Commit history
Commits on May 2, 2018
Update shell scripts to compute empty tree object ID
Show description for 03a7f38
bk2204
authored and
gitster
committed
03a7f38
View commit details
Copy full SHA for 03a7f38
View code at this point
Browse repository at this point
Commits on Sep 24, 2013
sample pre-commit hook: use --bool when retrieving config var
Show description for af1748b
jherland
authored and
jrn
committed
af1748b
View commit details
Copy full SHA for af1748b
View code at this point
Browse repository at this point
Commits on Jul 15, 2013
templates: spell ASCII in uppercase in pre-commit hook
Show description for 7b3742f
RichiH
authored and
gitster
committed
7b3742f
View commit details
Copy full SHA for 7b3742f
View code at this point
Browse repository at this point
templates: Reformat pre-commit hook's message
Show description for b1d5a57
RichiH
authored and
gitster
committed
b1d5a57
View commit details
Copy full SHA for b1d5a57
View code at this point
Browse repository at this point
templates: Use heredoc in pre-commit hook
Show description for 27b6e17
RichiH
authored and
gitster
committed
27b6e17
View commit details
Copy full SHA for 27b6e17
View code at this point
Browse repository at this point
Commits on Oct 26, 2011
make the sample pre-commit hook script reject names with newlines, too
Show description for c14daa4
meyering
authored and
gitster
committed
c14daa4
View commit details
Copy full SHA for c14daa4
View code at this point
Browse repository at this point
Commits on Mar 20, 2010
Modernize git calling conventions in hook templates
Show description for 100e762
Ben Walton
authored and
gitster
committed
100e762
View commit details
Copy full SHA for 100e762
View code at this point
Browse repository at this point
Commits on Nov 7, 2009
pre-commit.sample: Diff against the empty tree when HEAD is invalid
Show description for c30eb85
dotdash
authored and
gitster
committed
c30eb85
View commit details
Copy full SHA for c30eb85
View code at this point
Browse repository at this point
Commits on Sep 22, 2009
pre-commit.sample: add comment re tr portability; fix grammar
Show description for f1e3156
Jim Meyering
authored and
gitster
committed
f1e3156
View commit details
Copy full SHA for f1e3156
View code at this point
Browse repository at this point
Commits on May 20, 2009
Extend sample pre-commit hook to check for non ascii filenames
Show description for d00e364
hvoigt
authored and
gitster
committed
d00e364
View commit details
Copy full SHA for d00e364
View code at this point
Browse repository at this point
Commits on May 16, 2009
pre-commit.sample: don't print incidental SHA1
Show description for c646217
meyering
authored and
gitster
committed
c646217
View commit details
Copy full SHA for c646217
View code at this point
Browse repository at this point
Commits on Jun 27, 2008
Update sample pre-commit hook to use "diff --check"
Show description for 03e2b63
gitster
committed
03e2b63
View commit details
Copy full SHA for 03e2b63
View code at this point
Browse repository at this point
Commits on Jun 25, 2008
Ship sample hooks with .sample suffix
Show description for f98f8cb
gitster
committed
f98f8cb
View commit details
Copy full SHA for f98f8cb
View code at this point
Browse repository at this point
Loading
You can’t perform that action at this time.