Re:Julia Evans: Git rebase, what can go wrong
by noahtallen on Monday November 06, 2023 @01:40PM
(#38166801)
You can very easily rewrite your commit message on GitHub when squash merging. Since the organizations I work exclusively use squash merge, I often just update the commit to be more valuable, listing the important changes it contains. (And of course the PR in GitHub will contain the commit history of the branch that was squashed, as well as any discussion.)
IMO, this is a lot simpler and easier to do than rebasing your branch to have a flawless history.
Re:Julia Evans: Git rebase, what can go wrong
by lesuorac on Monday November 06, 2023 @01:09PM
(#38166281)
Sounds like six vs half-dozen. Why does it matter if somebody amends vs squashes?
Re:Julia Evans: Git rebase, what can go wrong
by gray_-_wolf on Wednesday November 08, 2023 @04:06PM
(#38197020)
It does not matter if you have one commit. If your change is split into few commits for increased readability, in that case it does matter.
Do you really believe that if, for example, this change to btrfs filesystem https://lore.kernel.org/linux-btrfs/cover.1699470345.git.jos... would be squashed, nothing of value would be lost?
Re:Julia Evans: Git rebase, what can go wrong
by sodapopcan on Monday November 06, 2023 @02:14PM
(#38167343)
I rather strongly disagree here.
Having whitespaces mucks up commit, causing you to lose focus of what's actually important.
I have `git blame` aliased to `git blame -w` which ignores whitespace-only changes.
You can also reblame when you come across this formatting commits.
Things like this should not be standalone commits though, they should be incorporated into the previous branch by amending the original work. It takes some effort to have a useful git history, it does not just happen on its own.