VersionPress\Api\VersionPressApi::discardChanges PHP 메소드

discardChanges() 공개 메소드

Discards all changes in working directory.
public discardChanges ( ) : WP_REST_Response
리턴 WP_REST_Response
    public function discardChanges()
    {
        global $versionPressContainer;
        /** @var GitRepository $repository */
        $repository = $versionPressContainer->resolve(VersionPressServices::GIT_REPOSITORY);
        $result = $repository->clearWorkingDirectory();
        return new WP_REST_Response($result);
    }