top | item 45774578

(no title)

focom | 4 months ago

Commit message should be ephemeral too. Squashing after a PR should be the default. Only at that moment does the PR/Commit message matter.

discuss

order

bavent|4 months ago

Hard disagree here. GitHub does encourage this sort of thing, but even there for my PRs to be easily reviewable, I like to keep my commits organized and with good messages explaining things. That way the reviewer can walk the commits, and see why each thing was thing was done.

I also like it for myself, when I’m going over my own PRs before asking for a review - I will often amend commits to ensure the work is broken down correctly, each thing that should go together, does.

In a way, stacked PRs are just a higher-level abstraction of this too - same idea, keep work that goes together in the same place.

freedomben|4 months ago

Fully agree with you here. Blunt squashing is a bandaid to the problem of lazy commits. Commits should IMHO be specific and atomic. Like fixing one bug or implementing one feature. Obviously there are cases where this ideal isn't practical, but the answer is still not squash everything, it's to think for 10 more seconds about the commit and do your best.

focom|4 months ago

[deleted]

xorcist|4 months ago

Did you mean before the PR? Why would anyone have a review system if you change the code after review?

Hopefully the commits are already squashed and rebased before review to value reviewers' time.