Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
86
Shipping containers
alextercete
0
70
Parallelism and Symmetry
alextercete
0
250
Porting to .NET Standard
alextercete
0
74
Prepping Commits
alextercete
1
140
I love sushi, therefore I love rebase
alextercete
0
120
ReadyRoll for DotNet developers
alextercete
0
99
Coding Dojo: The Randori Kata
alextercete
1
570
How to be a good pair [programmer]
alextercete
0
140
Other Decks in Programming
See All in Programming
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
エディターってAIで操作できるんだぜ
kis9a
0
750
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
認証・認可の基本を学ぼう後編
kouyuume
0
250
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Python札幌 LT資料
t3tra
6
1k
Cell-Based Architecture
larchanjo
0
140
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3k
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
110
Implementation Patterns
denyspoltorak
0
110
Java 25, Nuevas características
czelabueno
0
100
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
300
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Agile that works and the tools we love
rasmusluckow
331
21k
How STYLIGHT went responsive
nonsquared
100
6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
510
Thoughts on Productivity
jonyablonski
73
5k
Abbi's Birthday
coloredviolet
0
3.7k
We Are The Robots
honzajavorek
0
120
The agentic SEO stack - context over prompts
schlessera
0
560
The Cult of Friendly URLs
andyhume
79
6.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
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