411
you are viewing a single comment's thread
view the rest of the comments
[-] snugglebutt@lemmy.blahaj.zone 98 points 5 days ago
[-] CodeMonkey@programming.dev 83 points 5 days ago

Senior developer tip: squash the evidence.

[-] grrgyle@slrpnk.net 28 points 5 days 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.

[-] JackbyDev@programming.dev 3 points 4 days ago

And then my team squashes those commits 😩

[-] grrgyle@slrpnk.net 1 points 4 days 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

[-] xilliah@beehaw.org 2 points 4 days 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?

[-] grrgyle@slrpnk.net 2 points 4 days 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

[-] sorter_plainview 9 points 5 days ago

git commit --amend --no-edit

This helped me countless times...

[-] SatouKazuma@programming.dev 6 points 5 days ago

Senior developer tip: Squash ~~the evidence~~ management

[-] RonSijm@programming.dev 9 points 4 days ago
git reset head~9
git add -A
git commit -am 'Rebased lol'
git push -f
this post was submitted on 27 Jun 2024
411 points (95.4% liked)

Programmer Humor

18253 readers
897 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