While developing, I will sometimes try a technique or method that doesn't pan out right away. Once I decide to move on to another task or try another technique for the same task, I'm never sure what to do with the non-working code. I want to keep it as a record of what I tried, so I know what didn't work or even as a starting place for trying to make it work again.
Usually I just leave the code in place, commented out and uncommitted to VCS, for some length of time. This becomes a pain however as it clutters code and has to be dodged on VCS commits. I happen to be using git which has a "stash" function for temporary storage, but I'm not sure if that's an appropriate use.
How do you handle code you want saved for posterity, but don't want as part of your mainstream code base?
Windows: If possible, remove password encryption or restricted access from the file. Go to File > Info > Protect Workbook and remove any passwords or restricted access settings.
Choose “Recover Unsaved Workbooks” to display and recover unsaved Excel files. Excel saves unsaved files to the folder C:\Users\\AppData\Local\Microsoft\Office\UnsavedFiles. You can also access the files from this folder.
Branches!
Also you can perform archive operations ( $ = console ):
where <branchname> == TotallyAwesomeBranchName
... or whatever you name your branches =]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With