Hacker News new | ask | show | jobs
by oellegaard 4154 days ago
I'd still argue that this is an anti-pattern. If you find yourself in a situation where you want to leave out a line from git in the middle of a file, you should reconsider the structure of your code/project/whatever.
1 comments

Agreed. The article isn't particularly useful because it essentially says "this is how you solve a 'problem' that I'm only going to demonstrate by giving an example I immediately dismiss" and not explaining the type of situation in which this might be useful. Every time I've found myself in a similar situation, the problem has not been that git doesn't allow me to pretend that certain lines in a file don't exist, it's been that my design has been lacking.