FWIW, I love this mentality for healthy, work/life-balanced teams. It works if you structure around it. I often get the itch during the weekend to do a little work, so I go for it, because I can balance my days as I see fit. Ride the wave of creativity when it arrives, go do something else — like taking a hike, or running errands — when you can’t get shit done.
I imagine the only people who would think otherwise have some pretty dysfunctional repo setups and/or policies.
You revert that commit, then. It's broken. A revert shouldn't be take as some mark of failure or personal offense, it's just that your commit breaks the build, so it's getting removed from `main` until such a time as it doesn't do that. It happens to us all, from time to time. Those reverts almost always carry what at any profession organization should be an implied "feel free to bring this in a PR again, with fixes".
(And ideally, a bit of introspection as to "why didn't CI catch the failure when it was still on a branch?")
Personally I don't see why it's likely to cause major issues to allow people to merge PRs outside of business hours either, but depending on your team workflow and build pipeline (which may not be fully automated for any number of reason) it's not that hard to imagine cases where it's preferable to ensure all pushes to trunk occur during business hours (e.g. for cost saving reasons maybe you don't keep particular services running 24x7 that are needed to allow your integration test suite to run fully).
We did this at an employ of mine. They were on-demand, and spun up when you committed.
I was mostly responding to what appeared to be the fear of "but what if someone broke main off hours!"
This isn't just lip-service, either. May be hard to believe from a US perspective, but for a Norwegian based company, it can be taken at face value. It's the best place I've worked in my 22+ years.
Minor asterisk; we do have a few hours every week where you should be present (check-ins, meetings, all-hands, etc), but it's <5h/week for most people.
It’s usually best to stick with a “normal schedule” for family/socializing reasons, anyway.
But, it’s incredibly freeing, being able to work when the mood strikes. I used to be a night-owl, often getting super creative in the evenings. I could force myself to bed, sure, but a 3-4 hour stint in the evening would regularly produced outsized returns. 8-9am+ couldn’t remotely compete, creativity-wise, so why force it? Build a culture around trust and impact, it works out a lot better than anything else I’ve seen in practice.
I rarely do late nights anymore, having transitioned to 6-7am starts, an hour or two hiking around lunch with the dogs, and a small handful of hours of wrapping up & planning for tomorrow. But that was all my choice :)
What's the ultimately goal then? :) (it took me forever to learn than penultimate means "second most" so I am passing it on!)