r/ExperiencedDevs • u/No-Profession-6433 • Aug 19 '25
Never commit until it is finished?
How often do you commit your code? How often do you push to GitHub/Bitbucket?
Let’s say you are working on a ticket where you are swapping an outdated component for a newer replacement one. The outdated component is used in 10 different files in your codebase. So your process is to go through each of the 10 files one-by-one, replacing the outdated component with the new one, refactoring as necessary, updating the tests, etc.
How frequently would you make commits? How frequently would you push stuff up to a bitbucket PR?
I have talked to folks who make lots of tiny commits along the way and other folks who don’t commit anything at all until everything is fully done. I realize that in a lot of ways this is personal preference. Curious to hear other opinions!
View all comments
Show parent comment
2
u/OneParanoidDuck Aug 23 '25
Had to scroll a long way down to find someone doing the same as me. Not sure if that's a bad sign :)
For bigger tasks I tend to do the same for the convenience of having that diff available locally. When I commit and push only parts of what I set out to do, I "fear" I'll forget about the remaining parts. Also, in the early stages there's often lots of code still in flux; persisting that in a commit feels limiting.
But to be honest, it's probably my ever lasting imposter syndrome that makes me not want to look like a fool for pushing out garbage code.