Hacker News new | past | comments | ask | show | jobs | submit login

Yes, this is a very underhyped feature.

They're called "hunks" in git parlance: sections of the file that define a "diff". A diff on a file can be made of multiple hunks.

Very often, my changes to a file are a mix of "fixing a serious bug" and "minor refactoring" and "removing dead code". When the time to commit comes, git makes it trivial to separate all these changes in different commits so that each commit does one thing and one thing only.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: