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 }}
huanfeng
WindInput
Repository navigation
Code
Issues
76
(76)
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
WindInput
/
.gitattributes
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
19 lines (18 loc) · 1.25 KB
main
Breadcrumbs
WindInput
/
.gitattributes
Copy path
Top
File metadata and controls
Code
Blame
19 lines (18 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Git hooks 必须保持 LF。
#
# 本仓 core.autocrlf=true:不显式声明的文本文件在 checkout 时一律转成 CRLF。而 Git Bash
# 执行 shell 脚本时,CRLF 会让首行变成 `#!/usr/bin/env bash\r`,报
# "bad interpreter: No such file or directory" —— hook 在新 clone 的机器上直接失效,
# 且失效方式是静默的(git 只在 stderr 抱怨一句,提交照常进行,格式检查等于没跑)。
#
# 2026-08-22 实测:删掉工作区的 .githooks/pre-commit 再 checkout,行尾确实变成 CRLF。
# 这个隐患在改 hook 之前就存在,只是原脚本恰好没在本机暴露。
#
# ⚠️ 这里**只声明 .githooks**,不放宽到 `*.sh`:本仓 C++/Swift/toml/部分 rs 是 CRLF,
# 行尾规则牵一发动全身(见 memory 里那一串 CRLF 教训)。要给别的路径加规则时,先确认
# 那批文件在仓库里存的就是 LF,否则会给所有人制造一次全文件 diff。
.githooks/** text eol=lf
# wind_cli.bat 由 dev.sh / 发布流程原样拷到 Windows 机器上跑:行尾是 LF 时 cmd 解析不了
# (带标签的 bat 尤甚),任何参数都报 9009。Linux 侧 checkout 不会像 autocrlf 那样自动转,
# 故显式钉死 CRLF。
wind_input/scripts/wind_cli.bat text eol=crlf
You can’t perform that action at this time.