code: def reset_to_last_commit():
      
      try:
          repo = Repo()
          gitcmd = repo.git
          gitcmd.reset(hard=True)
      except Exception:
          pass
docs: reset a modified file to his last commit status
  
      This method does the same than a ::
  
          $ git reset --hard
  
      Keyword Arguments:
          <none>
  
      Returns:
          <nothing>