News for hackers. Stuff that matters.
Re:Git add -p by colinbartlett on Monday January 20, 2014 @09:25AM (#7089627)
The most powerful git feature John Kary just learned about. These linkbait headlines drive me crazy.
Re:Git add -p by revscat on Monday January 20, 2014 @10:08AM (#7089829)
I, too, see stories on HN that are passing on information that I was already aware of. Instead of commenting on their obviousness, though, I just move on to the next story and let those who did not previously know enjoy their new found knowledge. I don't presume myself their better because I happened to be aware of it first.

Also, relevant XKCD:

http://xkcd.com/1053/

Re:Git add -p by sltkr on Monday January 20, 2014 @10:15AM (#7089868)
I think the complaint is about the presumptuousness of the title of the post, not so much the obviousness of the content.
Re:Git add -p by stanmancan on Monday January 20, 2014 @10:35AM (#7089974)
This title isn't even really link bait. It tells you the feature in thw title. If you know what the "p" flag does, no need to click on the link to find out. For those that don't know of the feature, it is enticing enough to get them to check it out
Re:Git add -p by xmlninja on Monday January 20, 2014 @10:57AM (#7090099)
Im mostly disturbed by the "most powerful" part because this is subjective to project and how you work. It's not a very common case for me to commit parts of changes in a file because in most of my cases all changes I do to a file belong to the same commit since I work with feature branches. However when I do need this it's indeed powerful but judging by the enthusiasm of the post and title it just smells like the endorphin release of new feature discovering.
Re:Git add -p by ryansouza on Monday January 20, 2014 @11:53AM (#7090429)
Even with topic branches, I find staging with -p to be a nice chance to review the diff piece by piece. Helps me build good commit messages, and makes it easy to split changes in to a set of commits if I feel thats necessary.
Re:Git add -p by gutnor on Monday January 20, 2014 @11:43AM (#7090377)
It is fairly an honest title. The guy talk only about that feature, use original content, talk about something available for free which he most likely does not have an immediate interest.

There is a little bit of exaggeration in the title to attract people. That's how you drive traffic to your site. And let's be honest, if the guy was driving traffic that way to the startup he founded, people would have much recommendation about much less honest strategies.

Re:Git add -p by aeonsky on Monday January 20, 2014 @10:57AM (#7090097)
Or he could go with the much friendlier and less elitist: "feature you might not be aware of", "feature you might not be using yet".
Re:Git add -p by recuter on Monday January 20, 2014 @11:08AM (#7090169)
It correctly presumes that those who don't know about this feature will find it useful. That's about it.
Re:Git add -p by asveikau on Monday January 20, 2014 @10:39AM (#7089994)
Would be nice to have a "hide this story" feature for such an occasion. Would also help for those instances where the community's interest in a topic exceeds your own.
Re:Git add -p by huskyr on Monday January 20, 2014 @10:43AM (#7090011)
This Chrome extension does pretty much what you want: https://chrome.google.com/webstore/detail/hacker-news-mark-a...
Re:Git add -p by unfamiliar on Monday January 20, 2014 @10:27AM (#7089925)
He came across as irritated. You came across as self-righteous.
Re:Git add -p by zedpm on Monday January 20, 2014 @10:01AM (#7089798)
Does the top comment in _every_ HN post have to be an argument, criticism, or complaint? If you don't find value in a given post, then just move on. I suspect a lot of folks had indeed never heard of this feature before now.

I found this introduction to git add -p to be extremely helpful. I've found myself in the position he describes (wanting to logically separate changes I've made to a file) many times, and I've usually handled it in a sub-optimal manner (making one commit that describes multiple changes).

Re:Git add -p by FrozenCow on Monday January 20, 2014 @10:10AM (#7089845)
The 'problem' is that this tip has been posted a lot on HN/Reddit. It becomes annoying for some people to keep reading about a "git feature you're not using yet". That said, the feature isn't well-known for everyone and it is very useful, so you can only expect negative as well as positive comments.
Re:Git add -p by Killswitch on Monday January 20, 2014 @10:40AM (#7090000)
I've been a HN user for 701 days (as of today). This is the first time I've seen this topic here.. Sorry not all of us are on HN 24/7. This is new to me, and I appreciate it being posted, because guess what? I've never known of git add -p. Now I do. But wait, what if the person who posted this did indeed see something similar posted here last year and never posted it? Great, now I won't ever have known this great feature.

Like stated before. Don't like the content? Don't upvote it. Move on. The complaining in every thread about these things are more annoying than seeing the same thing posted again after a month or two.

Re:Git add -p by chaz on Monday January 20, 2014 @10:12AM (#7089858)
The upvotes seem to validate the article's value, even if the topic has been posted in the past.
Re:Git add -p by aeonsky on Monday January 20, 2014 @10:12AM (#7089855)
Because the title provides a statement without any evidence and is downright condescending?
Re:Git add -p by lifeisstillgood on Monday January 20, 2014 @10:28AM (#7089931)
Imagine a vast school, with all the kids intermingling, and one shouts up and says "My God I understand algebra!". This is a signal for the kids who are struggling with algebra to head in their direction and ask questions or copy the homework answers. Its also a good signal for kids who are working on groking calculus that he is not to be listened to.

To avoid this in schools we sit kids in age-related classes, of small size. But the world is a big school and there is no central authority who knows what we should learn and when.

We just need better filters to block out the noise of algebra-learning kids while we work on infinite series. Those filters might be news-style forums, at least until there are too many kids at different stages on here. Then we have to work on our own filters.

And listen for the kid who shouts "My god, I built a filter to ignore calculus learning kids!"

Edit: OK, Ok there is a difference between link-bait headlines and pre-known content. But the kid has to shout something.

Re:Git add -p by rplnt on Monday January 20, 2014 @09:50AM (#7089741)
I really hate these presuming "you don't know about" (a dozens of other variations) titles. This by itself makes me not want to read the article at all.

And I didn't use or know about the feature.

Re:Git add -p by johnkary on Monday January 20, 2014 @11:03AM (#7090137)
Author of the post here.

I obviously didn't just learn about patch mode... git has many powerful features, but I feel this is the most powerful of those that many git users don't know about yet that will make the biggest positive impact in their daily git use. Not that patch mode is the most powerful feature git has.

Re:Git add -p by gafads on Monday January 20, 2014 @10:09AM (#7089835)
Do you know what drives me crazy? It's little men with a desire to feel superior who complain about inconsequential titles in an attempt to come across as intellectuals.
Re:Git add -p by colinbartlett on Wednesday January 22, 2014 @08:02PM (#7106416)
Good thing I am not a little man.
Re:Git add -p by ronyeh on Monday January 20, 2014 @10:59AM (#7090109)
It'd be nice if people stopped complaining about articles being old news. The guy posted this in 2012, and said he learned it a year ago (2011).

If you already know the feature, move on to the next article. Other people don't know about this feature and upvoted it.

Re:Git add -p by niix on Monday January 20, 2014 @11:36AM (#7090329)
Exactly. Been using -p for a long time.