mirror of
https://gitlab.com/ProcyonLotor/vrchat-template.git
synced 2026-08-25 10:43:53 +05:00
Added shell scripts for discarding changes
This commit is contained in:
26
repo-discard.cmd
Normal file
26
repo-discard.cmd
Normal file
@@ -0,0 +1,26 @@
|
||||
@ECHO OFF
|
||||
TITLE Restore Unity Project repo
|
||||
SETLOCAL
|
||||
|
||||
CD "%~dp0"
|
||||
git rev-parse --is-inside-work-tree >NUL || GOTO die
|
||||
|
||||
ECHO The following files were changed and will be reverted:
|
||||
git diff --name-only HEAD
|
||||
|
||||
ECHO.
|
||||
CHOICE /M "Execute"
|
||||
IF %ERRORLEVEL% NEQ 1 (
|
||||
ECHO Aborting restore...
|
||||
) ELSE (
|
||||
git restore "%~dp0." || GOTO die
|
||||
ECHO Done.
|
||||
)
|
||||
|
||||
:end
|
||||
PAUSE
|
||||
EXIT /B 0
|
||||
|
||||
:die
|
||||
PAUSE
|
||||
EXIT /B %ERRORLEVEL%
|
||||
Reference in New Issue
Block a user