While programming software stored in a Subversion repo, I often modify some files, then notice that I\'d like to do some preparatory change for my main work. E.g. while impl
The branching and patching ideas above are great, but they don't work well for me. I use a visual diff tool, so running git diff doesn't produce text-based patches. Our build system spins up a new environment each time a branch is created, so creating temporary "stash" branches would get messy.
Instead, I wrote a little shell script that copies a file to a "shelf" directory, adds a timestamp, and reverts the change. It's not as robust as the solutions above, but it also avoids some of the pitfalls that I ran into.