explain the initialization and make sure the local state repo is up-to-date