input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The system should have methods to commit changes and restore to a previous version. If the given list of lines is empty when initializing, the system should not throw an error.
  
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
   
      def commit(self):
          self.mark += 1
          log_file = open("log_file.txt", "a+")
          log_file.write(str(self.mark) + ": " + str(self.lines))
          log_file.close()
   
      def restore(self):
          log_file = open("log_file.txt", "r")
          lines = log_file.readlines()
          to_mark = self.mark-1
   
          self.lines = lines[to_mark]
          log_file.close()
  
  assert VersionControl([1, 2, 3]).commit() == None
  assert VersionControl([1, 2, 3]).restore() == None
  assert VersionControl([]).commit() == None
  assert VersionControl([]).restore() == None
output: 
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.history = []
  
      def commit(self):
          self.history.append(self.lines[:])
  
      def restore(self):
          if self.history:
              self.lines = self.history[-1][:]
  