←back to thread

1062 points mixto | 3 comments | | HN request time: 0s | source
Show context
wodenokoto ◴[] No.42944183[source]
On the promise of going back in time, I’m finding myself getting more utility of VS Codes timed snapshots than my own commits.

I find it hard to judge when things are in a good enough state to commit and especially good enough to have a title.

I might start writing a new function, decide that I want it to be a class only to give up the class and wanting to return to my almost complete function. Snapshot works pretty well for that, but got isn’t really centered around snapshots and doing good snapshots is not straightforward, at least to me.

What do you guys do?

replies(4): >>42944257 #>>42944328 #>>42947021 #>>42948158 #
1. foobarbaz33 ◴[] No.42944328[source]
> I find it hard to judge when things are in a good enough state to commit

Work in a feature branch. Commit often. Squash away the junk commits at the end.

> ...and especially good enough to have a title.

Who needs a title? It's perfectly fine to rapid-fire commits with no comment, to create quick save points as you work. Bind to a key in your editor.

I treat commits in a private branch the same as the undo log of the text editor. No one cares about the undo log of your editor as they never see it. The same should be true of your private feature branch commits. They are squashed away never to be seen by human eyes again.

replies(1): >>42947194 #
2. jaapz ◴[] No.42947194[source]
If I had 5 cents for every commit in a feature branch with the commit message "wip"...
replies(1): >>42949654 #
3. foobarbaz33 ◴[] No.42949654[source]
You should have 0 cents. Squash and chill is the way to go.