- zoey ( @snugglebutt@lemmy.blahaj.zone ) English66•3 months ago
oh god, it’s me- CodeMonkey ( @CodeMonkey@programming.dev ) 49•3 months ago
Senior developer tip: squash the evidence.
- grrgyle ( @grrgyle@slrpnk.net ) 18•3 months 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 ( @JackbyDev@programming.dev ) English3•3 months ago
And then my team squashes those commits 😩
- grrgyle ( @grrgyle@slrpnk.net ) 1•3 months 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
- Elise ( @xilliah@beehaw.org ) 2•3 months 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 ( @grrgyle@slrpnk.net ) 2•3 months 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 ( @sorter_plainview@lemmy.today ) 6•3 months ago
git commit --amend --no-edit
This helped me countless times…
- SatouKazuma ( @SatouKazuma@programming.dev ) 3•3 months ago
Senior developer tip: Squash
the evidencemanagement
- SturgiesYrFase ( @SturgiesYrFase@lemmy.ml ) 10•3 months ago
F
- RonSijm ( @RonSijm@programming.dev ) 7•3 months ago
git reset head~9 git add -A git commit -am 'Rebased lol' git push -f
- verstra ( @verstra@programming.dev ) 4•3 months ago
F
- Elise ( @xilliah@beehaw.org ) 2•3 months ago
🫂
- mariusafa ( @mariusafa@lemmy.sdf.org ) 31•3 months ago
Please use Conventional Commits. Simple and easy to use. Plus it is very easy so combine with Versioning techniques like Semantic Versioning.
- JackbyDev ( @JackbyDev@programming.dev ) English3•3 months ago
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”.
- mariusafa ( @mariusafa@lemmy.sdf.org ) 1•3 months ago
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.
- JackbyDev ( @JackbyDev@programming.dev ) English1•3 months ago
The generic name I’m complaining about is “conventional commits”, not “fix” and “feat”
- onlinepersona ( @onlinepersona@programming.dev ) English13•3 months ago
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.
- JackbyDev ( @JackbyDev@programming.dev ) English2•3 months ago
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.
- Eskuero ( @eskuero@lemmy.fromshado.ws ) 8•3 months ago
My ass who was sending patches to cyanogenmod gerrit ten years ago would never.
device: msm8916-common: BoardConfig: Build libril from source
- datavoid ( @datavoid@lemmy.ml ) English2•3 months ago
To real, it hurts