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

That makes "git bisect" and "git blame" fairly useless. Please don't do that. Better to keep "oops" commits than squashing a series of logical changes into one monster commit.



"oops" commits are bad for this too (harder to find the regression when there's unrelated broken states), but you're right that it's less bad.

Note that you can bisect --first-parent if you want the "just find the topic branch that introduced this" behavior, without taking away the ability to find the actual commit!


I didn't know about --first-parent, thanks! That gives me something to do while narrowing down the exact commit :)


I don’t think there is a one size fits all answer here. “Oops” commits make blame useless too plus they make following any meaningful change very hard.

You want small commits in main, so send small PRs. If you have a feature, you can do a feature branch and merge into it the small commits then merge (don’t squash) feature branch into main.


I see now that the grandparent was enforcing squash commits, did not mean to single out your comment.

It just blows my mind as someone with a somewhat perfectionist approach to rebasing (to the extent I sometimes intentionally break up or reorder commits to make the changes more intentional or natural, even when it causes nasty local merge conflicts) :P


Well, I’d appreciate it if I collaborate on a repo with you. I end up giving up commit hygiene due to the absolute lack of interest from folks I work with unfortunately :)




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

Search: