Hacker News new | ask | show | jobs
by astonex 1650 days ago
Of course there are. For example a one line change to make the text-size slightly bigger.
3 comments

All you can ever say when you push up a git commit to master is ‘I’m pretty sure the sequence of commands I ran locally will lead to pushing up a single one line commit that has no significant risk’

If you’ve never found yourself in the position where you slipped up and accidentally included one of the following in a commit that you didn’t notice until after you pushed, I envy your attention to detail:

- a line of code commented out to bypass it when running locally

- a non passing test

- a disabled test

- a config change to point to local host instead of a real server

- a developer credential

- a change to a package lock file

- some build output that should have been gitignored

Yes, you should diligently check what you will push before you push; but since git won’t stop you pushing any of these things, and when you are making a ‘quick one line change’ is precisely when your guard is down because you don’t think you could possibly be accidentally about to ship one of these things, these things will get pushed to master if you allow pushes to master.

* There might be a typo

* A bigger text size might break the layout or the styleguide conventions

* Small style changes might break a11y

* Your branch might be messed up, causing you to push a bunch of unrelated changes.

Just a few reasons i can think of, I'm sure there are more.

but thats the commit that accidentally will include something else that blows up everything. It's not only about checking the desired change, but it's also about checking that it was the only thing committed