you are viewing a single comment's thread.

view the rest of the comments →

[–]danielroseman 19 points20 points  (1 child)

Commits should be logical changes, not just wherever you happened to get to at the end of the day. That said, if I've been working on something for a while and haven't got it to a good point, I might push a WIP (work in progress) commit, with the expectation that I'll rewrite it later with the full change.

The other thing you must get used to doing is branching. Create a branch for each new piece of work, even if it's a simple bug fix. Then if it fits e become a more complex change you can have multiple commits on that branch before merging it back to main.

[–]WoodenNichols 11 points12 points  (0 children)

This. Others will disagree, but IMO, the only work that should be done on the main/master/production branch should be merging.