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
210
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
97
Shipping containers
alextercete
0
79
Parallelism and Symmetry
alextercete
0
260
Porting to .NET Standard
alextercete
0
83
Prepping Commits
alextercete
1
160
I love sushi, therefore I love rebase
alextercete
0
120
ReadyRoll for DotNet developers
alextercete
0
110
Coding Dojo: The Randori Kata
alextercete
1
590
How to be a good pair [programmer]
alextercete
0
150
Other Decks in Programming
See All in Programming
Lessons from Spec-Driven Development
simas
PRO
0
150
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
340
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
4.9k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
240
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
100
さぁV100、メモリをお食べ・・・
nilpe
0
130
Contextとはなにか
chiroruxx
0
200
New "Type" system on PicoRuby
pocke
1
750
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Thoughts on Productivity
jonyablonski
76
5.2k
How to make the Groovebox
asonas
2
2.2k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
210
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
The SEO Collaboration Effect
kristinabergwall1
1
480
Facilitating Awesome Meetings
lara
57
7k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
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