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
Events
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 }}
Antruly
libuvcpp
Repository navigation
Code
Issues
2
(2)
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
libuvcpp
/
.gitattributes
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
45 lines (42 loc) · 1.91 KB
master
Breadcrumbs
libuvcpp
/
.gitattributes
Copy path
Top
File metadata and controls
Code
Blame
45 lines (42 loc) · 1.91 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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 行尾:仓库里一律存 LF,检出时按平台给本机行尾。
#
# 这份树最初在 Windows 上开发,于是工作树里的文件是 CRLF、而索引里是 LF。
# git 因此长期把 ~237 个文件报成"已修改",真正有内容变化的只有 26 个 ——
# 这种噪声最坏的后果不是看不清楚,是**训练人用 `git add -A`**:那一次会把
# 全仓存储的行尾整体改写,造出一个十几万行的噪声提交,把真实改动埋掉。
#
# 实测(2026-09-29)索引里含 CR 的文件数为 **0** —— 也就是说这份
# `.gitattributes` 不改写任何已存储的字节,它只是让"工作树 CRLF / 索引 LF"
# 不再算作差异(内容哈希那一侧本来就按通用换行读,不受影响)。
#
# 加这条之后,工作树里那些纯 CRLF 差异的文件从 `git status` 里消失;
# 剩下的每一条都对应一次真实的改动。**新文件写 LF**(源码带 BOM,文档不带,
# 见 CONTRIBUTING.md),别再让工作树重新长出 CRLF 来。
* text=auto
# 二进制:显式声明,别让 `text=auto` 的内容嗅探有出错的机会。
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
*.zip binary
*.gz binary
*.lib binary
*.dll binary
*.exe binary
*.obj binary
*.pdb binary
*.a binary
# 锁文件是脚本逐行读写的产物,Windows 上生成时行尾会是 CRLF。钉成 LF,
# 让"生成它的机器"不影响存进去的字节。
tests/tools/doc_line_refs.lock text eol=lf
# Windows 脚本:检出时一律 CRLF,与平台无关。
#
# `* text=auto` 只保证"索引里是 LF、检出按 core.eol"——在 Linux 上打包
# (build-kit 的 MinGW kit 就是这么打的)时,zip 里的 build.cmd 会是
# LF-only。cmd.exe 对 LF-only 批处理里的 `goto :label` 不保证能认,
# 而这些文件是给 Windows 用户的入口,所以钉死成 CRLF。
*.cmd text eol=crlf
*.bat text eol=crlf
*.ps1 text eol=crlf
You can’t perform that action at this time.