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

Principle developer tip: rewrite history to make yourself seem smarter.

Soft reset the whole branch and commit a series of atomic and semantic patches (eg separating code, test, and refactor changes) that tell a clean narrative of the changeset to reviewers, future blamers.

[-] [email protected] 3 points 1 year ago

And then my team squashes those commits 😩

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

Yeah it sucks. If the commits are really helpful, you can just paste the git log into the PR/MR/CR body after it's been merged

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

Do you put effort into your commit messages before the rewrite, or just write something quick for yourself and then put in the effort later?

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

Depends, but usually I will put in the effort up front and maybe tweak them in an in[eractive rebase, or just manually copy+paste.

If they're worth saving. Sometimes you have to kill your darlings though

this post was submitted on 27 Jun 2024
425 points (95.5% liked)

Programmer Humor

24501 readers
333 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 2 years ago
MODERATORS