Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The end of your line-endings nightmare
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alex Tercete
January 24, 2017
Programming
210
0
Share
The end of your line-endings nightmare
See:
https://github.com/search?q=line+endings&type=Commits
Alex Tercete
January 24, 2017
More Decks by Alex Tercete
See All by Alex Tercete
Making Makefiles
alextercete
0
95
Shipping containers
alextercete
0
77
Parallelism and Symmetry
alextercete
0
260
Porting to .NET Standard
alextercete
0
82
Prepping Commits
alextercete
1
150
I love sushi, therefore I love rebase
alextercete
0
120
ReadyRoll for DotNet developers
alextercete
0
110
Coding Dojo: The Randori Kata
alextercete
1
580
How to be a good pair [programmer]
alextercete
0
150
Other Decks in Programming
See All in Programming
CDK Deployのための ”反響定位”
watany
5
810
実践CRDT
tamadeveloper
0
590
AIと共に生きる技術選定 2026
sgash708
0
100
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
150
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2k
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
150
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
1k
AIエージェントで業務改善してみた
taku271
0
540
事業会社でのセキュリティ長期インターンについて
masachikaura
0
260
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Six Lessons from altMBA
skipperchong
29
4.2k
Google's AI Overviews - The New Search
badams
0
980
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
320
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building the Perfect Custom Keyboard
takai
2
730
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Thoughts on Productivity
jonyablonski
76
5.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
Transcript
Alex Tercete @alextercete The end of your line-endings nightmare CRLF
LF CRLF
CRLF CRLF CRLF CRLF LF LF LF LF
CRLF CRLF CRLF CRLF LF LF LF LF LF LF
CRLF CRLF
~/.gitconfig [core] autocrlf = true
None
CRLF CRLF CRLF CRLF Working directory Objects database LF LF
LF LF Commit core.autocrlf = true
CRLF CRLF CRLF CRLF Working directory Objects database LF LF
LF LF Checkout core.autocrlf = true
CRLF CRLF CRLF CRLF Working directory Objects database LF LF
LF LF Commit core.autocrlf = input
Working directory Objects database LF LF LF LF Checkout LF
LF LF LF core.autocrlf = input
Are we there yet?
No!
~/code/repo/.gitattributes * text=auto
Objects database CRLF CRLF CRLF CRLF LF LF LF LF
CRLF CRLF LF LF LF LF LF LF LF LF LF LF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF CRLF
$ echo "* text=auto" >.gitattributes $ rm .git/index $ git
reset $ git add -u $ git add .gitattributes $ git commit -m "Introduce end-of-line normalization"
Objects database LF LF LF LF LF LF LF LF
LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF
Are we there yet?
NO! NO!
Objects database LF LF LF LF LF LF LF LF
LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF LF CRLF CRLF CRLF CRLF CRLF CRLF LF LF
$ git checkout <branch> $ git rebase master -s recursive
-X renormalize
$ git init $ echo "* text=auto" >.gitattributes $ git
add .gitattributes $ git commit -m "Initial commit"
Are we there yet?
Yes!
Alex Tercete @alextercete Thanks! LF
References Mind the End of Your Line http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ Dealing with
line endings https://help.github.com/articles/dealing-with-line-endings/ gitattributes Documentation https://git-scm.com/docs/gitattributes