2
submitted 1 month ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 0 points 1 month ago

But shouldn't be. How hard is it to summarize your work in a few words? Even a bad description is more memorable than a hash.

[-] [email protected] 2 points 1 month ago

The post mentions that these are for commits in a merge request before squash. When they’re squashed a proper message is given.

[-] [email protected] 0 points 1 month ago

Also, squashing is a pretty bad practice as it is. I can understand that it may make sense sometimes, but most of the time if you don't commit every other character you input, you're better off leaving some history of how your code evolved and what changes were coming together

[-] [email protected] 1 points 1 month ago

I think squashing is great and I would never want to go back. It helps ensuring:

  • All commits in main have useful messages. No more “fix pipeline errors”, “fix MR comments”, etc.
  • Ensures pipeline has been successful with all commits in main. No need to guess which commits will build and won’t build.
  • Easy to revert commits.
  • Eliminates incompressible history because someone had a bad day with git.
  • Encourages frequent commits. No need to ensure all commits are perfect and good in their own right. Commit when you want to commit even if it’s incomplete work.

And IMO, if your work warrants multiple commits, then it probably also warrants multiple merge requests. Merge requests should be rather small to make it easier to review.

Edit: another good thing is that when we decide to release, we can easily look through the commit history for a change log. No more sifting through minor fixes commits.

[-] [email protected] -2 points 1 month ago

git rebase trumps all of the things you mentioned...

Anti Commercial-AI license

[-] [email protected] 0 points 1 month ago

Git rebase can be hard to understand for many. Not everyone has the blessing of being in a team of Git gurus.

[-] [email protected] -2 points 1 month ago

It's more about the tooling. IDEs make it really simple.

Also people get scared when they hear it because of utterances like yours. I'm dumb af. Git rebase for your use cases can be renamed to "git edit-history $fromCommit". Nothing special about it.

Anti Commercial-AI license

load more comments (7 replies)
load more comments (7 replies)
this post was submitted on 19 Jul 2024
2 points (100.0% liked)

Git

2814 readers
3 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