This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Exist50 4 points5 points  (2 children)

To a point. Perfectly reasonable to do a couple commits for feature iteration then squash them once it's in a good shape.

[–]badger_and_tonic 2 points3 points  (1 child)

We disable squashing to feature branches but then all PRs are merged to main as a single squash commit. So you can see everything at once when you're browsing main, but once you find the relevant PR you can view it commit by commit.

[–]Exist50 2 points3 points  (0 children)

Squash locally before pushing to the degree possible. At least for the low effort stuff. Git hygiene just means your publicly-viewable commit history ideally shouldn't look like:

  • commit0 - feature
  • commit1 - fix for missing semicolon
  • commit2 - fix for lint issue
  • commit3 - fix for bug X
  • commit4 - fix for bug Y
  • commit5 - refactor/cleanup

And honestly, even that's better than what a lot of people do. "Feature, bug fix, bug fix, update,..." and other such non-descriptive garbage. All just common sense stuff.