Added convenience shell scripts

This commit is contained in:
raccoon
2026-03-02 12:06:35 +05:00
parent ec3f4237c4
commit b27ec72efe
7 changed files with 173 additions and 0 deletions

27
repo-discard.cmd Normal file
View File

@@ -0,0 +1,27 @@
@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%