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
Show parent comment
-1
u/jorgb 1d ago
That depends on how the organization has their branching setup and development flow, if pull requests are a thing, sure. OP asked when to commit, and I just mentioned "commit tested, and working code only". I used VCS and git for a long time without pull requests, and when I work solo I only bother with branches if the code is complex enough to warrant multiple commits to get to an end goal.