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

There are a multitude of Git workflows, and opinions on what the basic unit of change is: for some, a feature is atomic, so squash-merging feature branches is perfectly natural.

> facilitates much better code review discussions

This can be done while adding code to the feature branch

> allows for informative commit messages associated with the changes

I'm assuming you consider individual commits to be the basic unit of change? This isn't always the case. Some products are not amenable to adding features fractionally

> communicates clearly to future self about why changes were made

You can do that with a squash-merge too!

I've noticed people who work on an evergreen deployment can afford to work on a very granular, commit-level. However, if you have to support multiple production branches concurrently and often have to cherry-pick features and fixes across them, features will naturally become the basic unit of change you will find yourself gravitating towards, and will liberally use squash-merging just to keep your sanity.



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

Search: