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
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
87
Shipping containers
alextercete
0
70
Parallelism and Symmetry
alextercete
0
250
Porting to .NET Standard
alextercete
0
76
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
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Basic Architectures
denyspoltorak
0
660
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
240
登壇資料を作る時に意識していること #登壇資料_findy
konifar
2
680
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
Apache Iceberg V3 and migration to V3
tomtanaka
0
140
Data-Centric Kaggle
isax1015
2
760
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
410
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
160
Featured
See All Featured
BBQ
matthewcrist
89
10k
The SEO Collaboration Effect
kristinabergwall1
0
350
My Coaching Mixtape
mlcsv
0
46
Embracing the Ebb and Flow
colly
88
5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Designing for Timeless Needs
cassininazir
0
130
Making Projects Easy
brettharned
120
6.6k
Accessibility Awareness
sabderemane
0
47
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
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