logoalt Hacker News

whattoday at 2:12 AM4 repliesview on HN

You probably shouldn’t be committing things that are broken…


Replies

plorkyerantoday at 5:29 AM

You should be committing things that are broken all the time. Git works great as a persistent navigatible undo buffer, and you should commit every time you're in a state that you might want to return to.

moezdtoday at 2:23 AM

With tools like GitHub Actions and some added constraints, it's not always possible. You literally need a commit to trigger the CI workflow and it starts to trash your branch. Besides, aren't we all familiar with git commit -m "typo"?

normie3000today at 3:17 AM

This is likely saying you shouldn't save a word document that contains spelling mistakes.

hahahaatoday at 2:44 AM

Commit yes you absolutely can. Merge to trunk? Probably not, depends on your strategy.