Last minute commits are not heroic
Remember in Indiana Jones and the Temple of Doom where Indy and his compatriots are in a room with the only exit closing on them, and they all narrowly make it through the doorway before it closes? Indy even manages to grab his dropped hat from under the door in the last second.
I hate to break this to you, but that’s not you.
The programmer hero
You are a programmer. The equivalent scenario is less action packed: Late afternoon, the feature you’ve been working on all day is almost done, and time to head home is fast approaching.
What do you do? Quickly wrap up and ship it?
You’re getting tired, a bit hungry, and perhaps a little stressed that you might not be able to complete this task before leaving. Chances are you haven’t been performing your best for the last hour or so.
Relax, don’t do it
Sleep on it. Why ship it now? Nobody is going to need that code until the next morning anyways, so you might as well ship it then.
That will also give you the opportunity to re-read the code to see if it still makes sense the day after. Often you’ll spot some obvious thing that you need to fix before shipping.
Code pushed five minutes before you head home is likely to be not as well thought out, have more bugs, and will result in more code review pushback.
Remember, you are not Indy.