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

80 comments sorted by

View all comments

1

u/LuisBoyokan 1d ago

At the end of the day in case of fire or burglary during the night. I use the WIP on my branch

4

u/jorgb 1d ago

You better have a remote set and tell OP to push, otherwise commits don't add much if your repo is local 😉

1

u/Stock_Test2326 1d ago

haha true, my MacBook died suddenly and last few commits weren't pushed some are very critical things. gotta rebuild it again