logoalt Hacker News

hbogertlast Saturday at 9:51 AM2 repliesview on HN

so basically, not adhering to atomic commits. That's fine if it's a deliberate choice, but some people like me think commits should stand on their own.

(i'm assuming your are not squashing when merging, else it's pretty much the same workflow)


Replies

normie3000last Saturday at 12:51 PM

> i'm assuming your are not squashing when merging, else it's pretty much the same workflow

I AM squashing before merging. Pre-commit hooks run on any commit on any branch, AFAIK. In any serious repo I'd never be committing to master directly.

bawolfflast Saturday at 10:33 AM

Honestly, i find that a really weird view. I use (Local) commits for work in progress. I feel like insisting on atomic commits in your local checkout defeats the entire purpose of using a tool like git.

What do you do when you are working on something and are forced to switch to working on something else in the middle of it?

show 3 replies