r/git • • 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

84 comments sorted by

View all comments

1

u/bombay-boyz 2d ago

Think of commits as restore points. Every state where the whole project was working src and tests fully is a restore point. Using branches for experimentation is also a good practice especially for large chunks.