this post was submitted on 04 Jul 2026
27 points (88.6% liked)

Git

4712 readers
14 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 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] sukhmel@programming.dev 3 points 1 week ago (2 children)

And here we are, encouraged by our technical leadership to always have a single commit per branch that is constantly amended. I even think squashing the branch is not too good, but this is a step up from that

[–] Feyd@programming.dev 1 points 1 week ago* (last edited 1 week ago) (1 children)

Squashing is good because otherwise you have commits that are unreviewed and broken in your main branch which confounds git bisect, which is largely the only time most people even look at commit history

[–] sukhmel@programming.dev 2 points 1 week ago (1 children)

Largely yes, but also having it squashed requires better commit messages and comments to show what was done for what reason. But yes, bisect is the only reason I'm fine with squashing

[–] Feyd@programming.dev 1 points 1 week ago (1 children)

It seems for some reason you assume people have better discipline for commit messages made in the course of a branch that will be merged, but that's absolutely not true as a general rule. Additionally, even if the squashed commit message is bad, it will at least correspond to a PR in the forge.

[–] sukhmel@programming.dev 1 points 1 week ago

Yeah, some commit messages are very not good either

[–] whats_a_lemmy@midwest.social -1 points 1 week ago (1 children)
[–] sukhmel@programming.dev 2 points 1 week ago (1 children)

If you mean to ask what that means, it's that for development you start a branch and either do everything in one commit, or do everything in several, but each time you git commit --amend so that a history is overwritten and in the end it is only one commit still

[–] whats_a_lemmy@midwest.social 5 points 1 week ago (1 children)
[–] sukhmel@programming.dev 1 points 1 week ago

Because less merge conflicts (we also rebase on top of master each time we commit)