this post was submitted on 27 Jun 2024
425 points (95.5% liked)
Programmer Humor
19687 readers
125 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
NGL I 'm a bit like that. I often do "work" commits so that my working tree is a bit more clean/I can go from working state to working state easily.
But before a PR, I always squash it, and most times it's just a single commit
How do you "squash" it?
Squashing
https://www.atlassian.com/git/tutorials/rewriting-history
You can also amend for a softer approach, which works better if you don't push to remote after every commit.
You can keep amending commits and creating more chunky and meaningful ones in an incremental way. Think of it as converting baby steps into an adult step.
Or if you want to --force commit 😈. Imo if it's my own working feature branch on a trunk-based roll-forward repo idgaf about rewriting history, and I will do it with wanton abandon.