Some years back my wife introduced a new principle called “Close the Circle” into our house hold. It was something she had read about somewhere on the www (unfortunately, neither of us can find the original reference).
Closing the Circle means that you finish your job before moving on to the next.
Our interpretation is that you always clean up after you have done something. Some examples: You do not leave the dishes for the next day, you make your bed in the morning, and you clean the bit after going horse back riding (free tip: Always mention horses in your blog 🐎).
Needless to say, we keep a pretty tidy home.
Of course there will always be jobs that cannot be finished in a short period of time. They may take weeks or months to complete. But you may be able to break the job into smaller task where each can be completed in a shorter time. For example, the last couple of months I have been putting up new fencing for our horses (there, I did it again) during the weekends. Each Saturday morning I set new goals for the weekend and when the weekend closing I set my tools aside and made sure everything looked tidy.
I like to apply the Closing the Circle principle to coding as well.
A task (on your Kanban board or whatever) should never be larger than what you can complete before moving on to the next task. That is, before moving on you
should have made a push to your remote repo and maybe even a pull request with the coded solution for the task including passing unit tests and updated documentation.
I am not saying this is what I always do. I am just saying that is what I strive to do and I think it is something that will keep your code tidy and give you a better work life balance.