elsewhencode / elsewhencode/project-guidelines

Guidelines too opinionated about squashing commits on develop

未關閉
#124 2 則留言 6 個 reaction 已指派 1 人 已被 @vpanjganj 認領 在 GitHub 檢視
help wanted improvement
主要語言
JavaScript
星號
29.4k
分支
3.1k
PR 合併指標
30 天內沒有已合併 PR

描述

In 1.2, we can read the following:

> You can use --autosquash to squash all your commits to a single commit. **Nobody wants** many commits for a single feature in develop branch. read more...

I think that asserting that nobody wants that is a fallacy. There are good reasons for which you would want to keep those commits separated even in develop branch:
- know what the reason of a change was when doing a git blame, which is naturally in the commit message/description and not in the feature
- having more precision for git bisect: squashing makes you lose information as you only know which feature caused a regression, rather than a specific commit (the latter narrows the scope)

Those are the reasons why I never squash my commits into a feature commit. You should therefore mention in your guidelines that this is subjective.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。