this post was submitted on 28 Sep 2023
18 points (100.0% liked)

Git

2875 readers
22 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

It's nice and all, but in a GitHub/GitLab PR workflow world, your commits are mostly squashed and rewritten by the remote, so it doesn't even show up on main

So there's really only a benefit if you don't use squash and bother with maintaining proper commit messages in your PRs

[–] [email protected] 6 points 1 year ago

This is yet another reason not to squash commits.

[–] [email protected] 4 points 1 year ago (1 children)

So there’s really only a benefit if you don’t use squash and bother with maintaining proper commit messages in your PRs

I'd argue that you should never squash and always maintain proper commit messages...

[–] [email protected] 1 points 1 year ago (1 children)

Not very convincing without reasoning

[–] [email protected] 2 points 1 year ago

I have never heard proper reasoning for squashing commits. I don't think sanitized history is useful in any context. Seeing the thought process that went into building something has been repeatedly useful in debugging things. It's also useful to me as a software engineering manager to help folks on my team get better. I could care less how "pretty" git log looks, but I care a hell of a lot about what git diff and git blame tell me. They help me figure out where issues actually are and how they came to be.