diff --git a/HiNC-update.bat b/HiNC-update.bat index a478950..5acb502 100644 --- a/HiNC-update.bat +++ b/HiNC-update.bat @@ -4,6 +4,15 @@ set "remoteRepo=https://HiNC-Public-Client:HiNCProduct20241117@superhightech-git "%git%" clone "%remoteRepo%" HiNC cd HiNC "%git%" remote set-url origin "%remoteRepo%" -"%git%" update-index --skip-worktree appsettings.json -"%git%" reset --hard && "%git%" pull +rem 僅保留 appsettings.json,本次更新其餘內容均以遠端為準 +set "APP_FILE=appsettings.json" +set "APP_BAK=%~dp0appsettings.json.bak" + +if exist "%APP_FILE%" copy /Y "%APP_FILE%" "%APP_BAK%" + +"%git%" fetch --all +"%git%" reset --hard origin/master +"%git%" clean -fd + +if exist "%APP_BAK%" copy /Y "%APP_BAK%" "%APP_FILE%" cd .. \ No newline at end of file