Content pfp
Content
@
0 reply
0 recast
0 reaction

Thomas pfp
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
55 reactions

Nico pfp
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 pfp
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

huugo pfp
huugo
@huugo.eth
This makes a lot of sense, basically record keeping for your thought and action process. Commit history maybe not that dissimilar to a decision journal. I code recreationally, and have never fully grasped the value of git and commits, but the way you describe it strike me as similar to what I’ve been trying to integrate in my regular day to work. When I complete a task, jot down a note of what I did, why, and what I expect out of it. A few days or weeks later, I might actually be able to recall it and more importantly recall the context that sent me to my conclusion.
1 reply
0 recast
2 reactions