this post was submitted on 27 Jul 2023
33 points (100.0% liked)

Git

2632 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
 

cross-posted from: https://lemmy.sdf.org/post/1352760

Was digging through a project at work today where some guy in 2014 made 100+ commits in a single day and the only one that had a comment said "upgrading to v4.0".

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 1 year ago (6 children)

The way I commit on my private branch is different than how I merge those commits to the main branch. When working on the private branch, things can get messy and if they do, I just try to keep certain things separate from each other (refactorings and bug fixes should not go into the same commit). Once the work is done, I do a interactive rebase to tidy things up and then merge them afterwards. Sometimes the changes are not that much and it becomes a squash commit. I would definitely refrain from creating 100 (insignificant and possibly back-and-forth) commits on the main branch.

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

I used to find rebasing annoying until I started using lazygit. It makes it really easy, now before opening a PR I just interactive rebase on top of latest main and I can easily clean up my commits before opening the PR.

[–] nittiyh 1 points 1 year ago

Sounds interesting, I’ll check it out! Thanks for the link

load more comments (2 replies)
load more comments (3 replies)