Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • What heuristics do you suggest for deciding which commits to squash, and which to keep separate? Commented Feb 11, 2021 at 4:21
  • Here's an example from Linux: Linus Torvalds considers the commit history the same as code. So, in exactly the same way that you refactor code so that the code looks like you knew exactly what you wanted to build and how from day 1, you refactor the history so that it looks like you knew exactly what steps to take to get to the result. Of course, this is an extreme example, because Linux has 3000 developers and there is a commit every couple of seconds (and the rate of commits seems to be increasing super-linearly), so a clean history is vital. Commented Feb 11, 2021 at 8:45
  • For my current project, I'm pushing new code to the server almost every week with new features. Let's say in a particular week I add 3 new features. Would you consider this to be a "release" to then be tagged? Commented Feb 11, 2021 at 14:12
  • 1
    I'd recommend squashing the commits for each feature, so you should have only 3 commits for the 3 features. I say this because most of the time commits in one feature consist of multiple small commits. There is no defined size of a release. You (organization) define it. A release is defined by a cadence or a need - say a weekly, monthly or quarterly release. An example of a need is a security patch or could be based on an agreement in a contract. So if you've added 3 new features and its time to release based on your cadence or need, then by all means - tag and release. Commented Feb 12, 2021 at 1:41