Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: kccasey on August 09, 2012, 10:50:33 pm
-
I would like to Exit without saving.
It seems that code blocks saves my changes to my code as soon as I compile. Sometimes I will screw up a program so badly that it is best to just revert back to my original.
Does anyone have a solution?
KC
-
The damage has been done before you exit. Code::Blocks needs to save before compiling because the compiler works with the files outside of Code::Blocks.
The best solution is version control or frequent back ups. (I will often make backup copies of files before I tinker with them if I don't have them in version control already, but version control is the best for tinkering with working code)
-
If the editor is still open, you can use "Edit -> Undo" or CTRL + Z to undo changes, but it's of course better to have a working version control system if possible.
git works good with local repos and it's not too hard to setup and use (at least on linux).
-
Thank you
I work with a text editor a lot so I'm spoiled.
It would be nice if code blocks created a temp file from my original to compile, leaving my original intact .
This way I could save only when I'm confident. Just a wish.
Backups until then.
Thanks again
-
Backups until then.
there is an AutoSave plugin that accounts for exactly this - you can setup when and how often your files are backed up and thus restore them at any time.
-
I would like to Exit without saving.
It seems that code blocks saves my changes to my code as soon as I compile. Sometimes I will screw up a program so badly that it is best to just revert back to my original.
Does anyone have a solution?
KC
This is what source control is for. Personally, I prefer Bazaar (http://bazaar.canonical.com/en/), but there are other good alternatives as well. When I screw up or change my mind, I simply use the revert function in Bazaar. I think Code::Blocks does what it should do, save files often. Perhaps it should even save project files more often IMHO.