Couple of, retrospectively, often almost incoherent sentences to capture top of mind state when I give up because it’s late.
I’ll write this gibberish comment here because I’ll definitely forget what I was doing and if the compile fails I probably won’t miss it!
It works surprisingly well!
I just use Jetbrains IDEs on projects with the IdeaVim plugin (integrates so well with the IDE, it’s pretty much my only must-have plugin for any software, beyond uBlock Origin), and Vim for external files (scripts, etc., or when I want to use a specific plug-in for editing).
By default IntelliJ (PyCharm, GoLand. any Jetbrains IDE…) has a pretty large undo history, and that can be extended to however long you like. The real killer, however, is the extended local history for the file, which is arbitrarily (or at least seems to be) long. Combine that with the wonderful built-in git history (which can be a separate pane/window!), and you’ll never worry about changes you’ve made being lost, or overwriting other history, no matter how overzealous you were with said changes.
I find IDEA’s built-in tools so useful I barely ever even think of using git stash or git shelve anymore (or directly calling ~30% of git commands for that matter), and those are commands for which I still have 20+ aliases for in my .bashrc.
Its git features are also quite comfortable. Very nice diff, I like very much the "Show history for Selection", live git annotate (with GitToolbox plugin). I don't often do rebase, but when I do the interactive rebase is also very helpful.
https://stackoverflow.com/questions/2985050/is-there-any-way...
It really saves the whole tree, not just the path that was active at the time of exit.
- SSD failure within moments of getting started for the day
- backlight failure
- mouse/keyboard failure
- human failure (spilling coffee on the computer)
Each time, I was out of commission until I got a replacement or the computer repaired and someone else had to pick up my work. If your computer becomes a brick, it doesn't really matter what you thought you wanted to do next.
I push code a couple of times a day. If something goes horribly wrong I just pick up another computer, pull the code, and continue working while I wait for a repair/part for the main computer (or for an OS to reinstall).
If your computer becomes a brick, just use a different computer.
My secondary is a 10-year old laptop which gets regularly used while sitting in bed in the morning, occasionally for actual work. The other backup is an old desktop I donated to my wife a few years ago, containing an unplugged SSD which is exactly as it was when I last used it. Both will still handle most of what I need, just a bit slowly.
Let’s say that last note of the day does not have to go to repo.
But I would expect some commit chain that would be useful produced and pushed.
A coworker fell off a ladder and broke both his arms. We had to look at his commits to figure out what he had gotten done. It was worthless. Absolute trash. His finished code was always top notch, but his WIP code … trash.
It was easier to ignore it and start from first principles than to try and pick up where he left off.
If you do PRs every few weeks then that could be a bigger issue. But then this should be a lesson to just not do that. Merge small steps often. It has tons of advantages.
I self-review my draft PR's and catch all kinds of weird formatting, messy or missing comments, and general clunkiness before imposing it on others to review.