Rather than redefining the class multiple times, commit new versions of the class with git. You can use git to view older versions of the file, rather than keeping all of the previous versions in the same file.