Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
The end of your line-endings nightmare
Search
Alex Tercete
January 24, 2017
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The end of your line-endings nightmare
See:
https://github.com/search?q=line+endings&type=Commits
Alex Tercete
January 24, 2017
Transcript
24 slides
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
More Decks by Alex Tercete
See All by Alex Tercete
Making Makefiles
alextercete
0
130
Shipping containers
alextercete
0
93
Parallelism and Symmetry
alextercete
0
280
Porting to .NET Standard
alextercete
0
98
Prepping Commits
alextercete
1
180
I love sushi, therefore I love rebase
alextercete
0
130
ReadyRoll for DotNet developers
alextercete
0
130
Coding Dojo: The Randori Kata
alextercete
1
610
How to be a good pair [programmer]
alextercete
0
180
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
700
Distance field of Julia set
kinakomoti321
0
330
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
510
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
120
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
980
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
670
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
190
Getting Started with Vibe Coding
miccheng
0
250
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
Featured
See All Featured
Believing is Seeing
oripsolob
1
290
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Building an army of robots
kneath
307
47k
Thoughts on Productivity
jonyablonski
76
5.5k
The Limits of Empathy - UXLibs8
cassininazir
2
800
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
320
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
590
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
GraphQLとの向き合い方2022年版
quramy
50
15k
The agentic SEO stack - context over prompts
schlessera
0
1k