Get the latest tech news

Converting a Git repo from tabs to spaces (2016)


This post is about the thing in the title. I used to work for Yelp.

Thankfully, Yelp mostly does work on beefy shared dev machines, so I only had to bug an ops person to stick this incantation in/etc/gitconfig and wait for Puppet. Also, BSD (i.e. OS X) expand apparently doesn’t have the--initial argument, but unless you’re in the habit of sprinkling tab characters inside string literals, you can safely leave it off. The problem was that git dutifully applied the smudge filter when checking this file out, converting it to spaces on-disk… but the copy in the repository still had tabs, making it appear modified.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of tabs

tabs

Photo of Spaces

Spaces

Photo of Git repo

Git repo

Related news:

News photo

Skin-sniffing wearable keeps tabs on your health | This tiny device could reveal an awful lot about your physiological health, just by measuring the gases you emit through your skin

News photo

IoT project using thermal sensors to monitor spaces

News photo

How We’re Keeping Tabs on DOGE