|
|
|
|
|
by choletentent
1590 days ago
|
|
Let's say you are editing a source code file. You save and you run. Than you tweak, save and run again. But then you would like to go two changes in the past, but you did not make a commit. Very recent changes are not captured by backup systems, no matter how competent they are. I'd like to have all my files under git, for every save - and frictionless. I know it is a lot to ask. |
|
I've been developing for many years and I can't remember the last time I ran into this problem, so you can try my approach. When I'm debugging something and unsure of my solution, I comment out the original code and put the potential replacement below. If that doesn't work, do the same. I'll sometimes have three or four potential versions. Also, I generally commit every time a task is finished. During development the tasks might be pretty granular ("implemented underlines, strikethroughs, and custom fg/bg colors for text"), but each bug fix gets its own commit ("bug-2309: text was offset incorrectly on Win32"). Between these two, I rarely run into the problem.