I use gulp to change files of my project.
gulp.task('task1', function(){
// change file1
});
gulp.task('task2', function(){
// change file2
});
And if one of the tasks fails (due to error), I need to restore whole project.
So im planning to make a backup, and on err
event of gulp, copy backup files to my project.
gulp.on('err', function(err){
// restore
});
But if someone press Ctrl + C while files are copied, project would not be fully restored. What are the common techniques of restoring?