473
you are viewing a single comment's thread
view the rest of the comments
[-] GandarfDeGrape@midwest.social 32 points 1 year ago

OK. Query.

Rebase or merge into current?

I personally never rebase. It always seems to have some problem. I'm surely there's a place and time for rebasing but I've never seen it in action I guess.

[-] h14h@midwest.social 2 points 1 year ago

I try to structure my commits in a way that minimizes their blast radius, which usually likes trying to reduce the number of files In touch per commit.

For example, my commit history would look like this:

  • Add new method to service class
  • Use new service class method in worker

And then as I continue working, all changes will be git commit --fixuped to one of those two commit's hashes depending on where they occur.

And when it's time to rebase in full, I can do a git rebase master --interactive --autosquash.

[-] dukk@programming.dev 1 points 1 year ago

This is the way! Small commits with descriptive commit names, then just fixup into a few feature commits. Makes rebase a breeze.

load more comments (24 replies)
this post was submitted on 14 Aug 2023
473 points (97.4% liked)

Programmer Humor

19623 readers
1 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS