I believe that if you have been using GitHub that there are previous versions of your code in the GitHubs repository (either shared or local repo) so then if you do have to undo/review some of your changes, you could always go back to a previous version and start from there.