code: def finish(self):
          
          self.repo.git.checkout(self.current_branch)
          self.repo.close()
docs: Clean up any state if processing completed/failed.
  
          For git, will checkout HEAD on the original branch when finishing