Files
vrchat-project-template/repo-discard.cmd
2026-07-25 09:14:32 +05:00

28 lines
412 B
Batchfile

@ECHO OFF
TITLE Restore Unity Project repo
SETLOCAL
CD "%~dp0"
git rev-parse --is-inside-work-tree >NUL || GOTO die
ECHO.
ECHO *** WARNING: The following files were changed and will be reverted:
git diff --name-only HEAD
ECHO.
CHOICE /M "Execute"
IF %ERRORLEVEL% NEQ 1 (
ECHO Aborting discard...
) ELSE (
git restore "%~dp0." || GOTO die
ECHO Done.
)
:end
PAUSE
EXIT /B 0
:die
PAUSE
EXIT /B %ERRORLEVEL%