Content
@
0 reply
0 recast
0 reaction
Thomas
@aviationdoctor.eth
How often am I supposed to commit and push to GitHub? I work mostly on solo projects, so I treat my repo mostly as a backup feature, i.e., I might commit once at the end of each day, and even then in the least descriptive manner (“fixed some stuff”). Should I be pushing every time I make one discrete update, which might be several times a day? I feel that this may be one of those late realizations in life like when you accidentally find out you haven’t been flossing and brushing your teeth in the correct order
8 replies
2 recasts
56 reactions
Nico
@nicom
So first, remember that committing is not pushing. Commits should ideally be done atomically to help you go back in history change by change. It's less a backup than organising the codebase. I have a lot of side projects that I leave untouched for months and I love to have commit messages to explain what I did, where I was at... Even if I work alone on them. It allows to be more multi project. Pushing is the backup phase. Do it once a day. Do not forget that your IDE probably also has a local history in addition to git. So you can rely on it for short refactoring or experiments. Finally, do not underestimate adding comments in the code directly, Todo, fixme, ... They will really help the WIP.
2 replies
0 recast
1 reaction
Thomas
@aviationdoctor.eth
That’s great advice. I’ve always followed every commit with a push but I guess I don’t need to
1 reply
0 recast
1 reaction
Nico
@nicom
If you push each time you lose a lot of time ... Local commit can become a reflex when it's fast and easy. Just push once a day, or of course if you need to push for CI to deploy
0 reply
0 recast
1 reaction