←back to thread

361 points mmphosis | 1 comments | | HN request time: 0.212s | source
Show context
simonw ◴[] No.42165792[source]
On commit size:

> You just never know when you have to revert a particular change and there's a sense of bliss knowing where you introduced a bug six days ago and only reverting that commit without going through the savagery of merge conflicts.

This is key for me: a good shape to aim for with a commit is one that can be easily reverted.

replies(7): >>42165815 #>>42166356 #>>42166417 #>>42166427 #>>42166824 #>>42167218 #>>42167574 #
patrick451 ◴[] No.42166417[source]
Unless all your features actually fit in one small commit, this doesn't work. Much more common is that you merge a chain of dependent commits, which means you cannot just rollback a single commit, since that will leave your codebase hopelessly broken. Much cleaner to commit the entire feature as one large commit.
replies(2): >>42167264 #>>42167433 #
keybored ◴[] No.42167264[source]
You can rollback a merge if that is the goal of this one-large-commit.
replies(1): >>42180843 #
1. keybored ◴[] No.42180843[source]
More precisely: you can revert a merge.