Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Commits are a form of documentation and can be useful for grouping together related changes. All of this context is lost when squash merging.

In some ways it is unfortunate that services like GitHub and GitLab have become so dominant in the industry. If you're just working with plain git there is no assumption that squashing is some kind of binary decision the way the UIs of the online VCS services tend to present it. It's normal to do an interactive rebase and squash some commits to clean things up before sharing your code, yet keep logically separate changes in their own distinct commits, and you can have a much nicer commit history if you do than with either the no-squash or squash-everything extremes. Of course you can still do that with something like GitHub or GitLab as well but I think perhaps a lot of less experienced developers have never learned how or even why they might want to.



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

Search: