r/git • u/TachikawaKan5241 • 2d ago
How often should I commit my changes?
I am fairly new to programming and git and I was just wondering how often I should commit my changes both locally and to Github? I feel like I'm doing it to often
9
Upvotes
View all comments
2
u/Janky-Code 1d ago
If by yourself or with partners on a project you are enthusiatic about, commit frequently, push regularly, and keep pull requests small for easy review.
If with people you don't like on work you couldn't care any less about, once a week at most. Add commit messages like "fix: fix minor changes." Squash all commits into "fix fix." Save up pull requests so they are so large that whoever has to review and test them hates you. If they reject your pr, close it and open a new one. Add terse comments or better yet incorrect comments.