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

11 Upvotes

84 comments sorted by

View all comments

8

u/2fletch 2d ago

Assuming you are on a feature branch do as many as you want, just rebase and squash before you make your PR.

I always think "would I want to lose this?"