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
Darryl Yeo đ ïž
@darrylyeo
Lots of benefits to committing atomically and as often as possible â easier to migrate features to other branches by cherry-picking or rebasing, easier to rollback or revert specific features out of order, easier to track down where a bug might have been introduced. More work upfront but well worth it in my opinion.
2 replies
0 recast
16 reactions
Thomas
@aviationdoctor.eth
That makes sense. I need to make it a habit because right now itâs more of an afterthought at the end of a coding session. Do you use the CLI or GitHub desktop?
2 replies
0 recast
3 reactions
Phil Cockfield
@pjc
Agree with Darryl. Small atomic units give you much more flexibility to deal with issues of change...in a sense, the number of commits itself is a form of additional state you build up and have at your disposal. If you want a more coherent log history in your repo though, (ie. a single commit with a clear message describing a larger chunk of work) you can do that at the PR level...squashing all your atomic commits up into a single higher-order commit that is what is left on `main` when you merge. (if that makes sense).
1 reply
1 recast
3 reactions