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
220
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
More Decks by Alex Tercete
See All by Alex Tercete
Making Makefiles
alextercete
0
120
Shipping containers
alextercete
0
86
Parallelism and Symmetry
alextercete
0
270
Porting to .NET Standard
alextercete
0
90
Prepping Commits
alextercete
1
160
I love sushi, therefore I love rebase
alextercete
0
130
ReadyRoll for DotNet developers
alextercete
0
120
Coding Dojo: The Randori Kata
alextercete
1
600
How to be a good pair [programmer]
alextercete
0
170
Other Decks in Programming
See All in Programming
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
580
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
420
Security issues being discussed on Web Platforms
petamoriken
0
1.4k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1k
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
4
400
Java 27新機能 / Java 27 new features
kishida
2
190
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
240
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.6k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
400
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.2k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Faster Mobile Websites
deanohume
310
32k
WENDY [Excerpt]
tessaabrams
14
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Documentation Writing (for coders)
carmenintech
77
5.6k
Design in an AI World
tapps
1
340
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
The Curious Case for Waylosing
cassininazir
1
550
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
240
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
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