Resetting repo in Python