r/git • u/TachikawaKan5241 • 1d 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
1
u/scritchz 1d ago
Locally? Use as many commits and branches as you like. It's better to commit more than less because you can always reset, squash, edit and rebase them.
On upstream (like GitHub)? I prefer to keep it clean and organized, that means commits should be complete and functional where possible. If you check out any of the upstream commits, they should work.