Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The end of your line-endings nightmare
Search
Alex Tercete
January 24, 2017
Programming
0
200
The end of your line-endings nightmare
See:
https://github.com/search?q=line+endings&type=Commits
Alex Tercete
January 24, 2017
Tweet
Share
More Decks by Alex Tercete
See All by Alex Tercete
Making Makefiles
alextercete
0
84
Shipping containers
alextercete
0
69
Parallelism and Symmetry
alextercete
0
250
Porting to .NET Standard
alextercete
0
72
Prepping Commits
alextercete
1
140
I love sushi, therefore I love rebase
alextercete
0
110
ReadyRoll for DotNet developers
alextercete
0
97
Coding Dojo: The Randori Kata
alextercete
1
560
How to be a good pair [programmer]
alextercete
0
140
Other Decks in Programming
See All in Programming
AIコーディングエージェント(skywork)
kondai24
0
120
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
140
Microservices rules: What good looks like
cer
PRO
0
580
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
230
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
270
tparseでgo testの出力を見やすくする
utgwkk
1
140
AIコーディングエージェント(Manus)
kondai24
0
130
CSC305 Lecture 17
javiergs
PRO
0
270
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
220
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Visualization
eitanlees
150
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
A better future with KSS
kneath
240
18k
Building Adaptive Systems
keathley
44
2.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
The Cult of Friendly URLs
andyhume
79
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
GitHub's CSS Performance
jonrohan
1032
470k
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