oh god, it's me
Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
Senior developer tip: squash the evidence.
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.
And then my team squashes those commits 😩
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
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?
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
git commit --amend --no-edit
This helped me countless times...
Senior developer tip: Squash ~~the evidence~~ management
F
git reset head~9
git add -A
git commit -am 'Rebased lol'
git push -f
F
🫂
Please use Conventional Commits. Simple and easy to use. Plus it is very easy so combine with Versioning techniques like Semantic Versioning.
Any standard that wastes valuable space in the first line of the commit is a hard sell. I don't see the point in including fix/feat/feat! just for the sake of "easy" semantic versioning because generally you know if the next release is going to be major or minor and patches are generally only only after specific bugs. Scanning the commits like this also puts way too much trust in people writing good commit messages which nobody ever seems to do.
Also, I fucking hate standards that use generic names like this. It's like they're declaring themselves the correct choice. Like "git flow".
You can always adapt to your how repo. But yeah, that's the point. If you can trust people to make changes on a repo then you should be able to trust them in using some kind of commit structure.
Generic names are probably used in order to crate a familiar, easy to remember, structurized commit format.
The generic name I'm complaining about is "conventional commits", not "fix" and "feat"
Sometimes I'm in awe at the effort people put into these memes. Well done 😄
P.S Now make one about people who squash 100 commits into one without cleaning up the message and have a single commit with 1k added / 2k removed in it for the sake of "clean" history.
Yesssss, so true. Anytime people say they want history to be "clean" I insist they explain what they mean because more often than not they're going to suggest something that makes the history way less useful.
My ass who was sending patches to cyanogenmod gerrit ten years ago would never.
device: msm8916-common: BoardConfig: Build libril from source
To real, it hurts