tune
This commit is contained in:
parent
8acda730f8
commit
41d8df090b
@ -4,15 +4,27 @@ set "remoteRepo=https://HiNC-Public-Client:HiNCProduct20241117@superhightech-git
|
||||
"%git%" clone "%remoteRepo%" HiNC
|
||||
cd HiNC
|
||||
"%git%" remote set-url origin "%remoteRepo%"
|
||||
rem 僅保留 appsettings.json,本次更新其餘內容均以遠端為準
|
||||
rem Keep local appsettings.json; align all other content to remote
|
||||
set "APP_FILE=appsettings.json"
|
||||
set "APP_BAK=%~dp0appsettings.json.bak"
|
||||
|
||||
echo Backing up %APP_FILE% to %APP_BAK% (if exists)...
|
||||
if exist "%APP_FILE%" copy /Y "%APP_FILE%" "%APP_BAK%"
|
||||
|
||||
echo Clearing index flags for %APP_FILE% (no-assume-unchanged / no-skip-worktree)...
|
||||
"%git%" update-index --no-assume-unchanged --no-skip-worktree -- "%APP_FILE%"
|
||||
echo Removing local %APP_FILE% to avoid 'not uptodate' conflicts...
|
||||
attrib -R "%APP_FILE%" >nul 2>&1
|
||||
del /f /q "%APP_FILE%" >nul 2>&1
|
||||
|
||||
echo Fetching latest changes from origin...
|
||||
"%git%" fetch --all
|
||||
echo Resetting working tree to origin/master...
|
||||
"%git%" reset --hard origin/master
|
||||
echo Cleaning untracked files and directories...
|
||||
"%git%" clean -fd
|
||||
|
||||
echo Restoring %APP_FILE% from backup (if exists)...
|
||||
if exist "%APP_BAK%" copy /Y "%APP_BAK%" "%APP_FILE%"
|
||||
echo Done.
|
||||
cd ..
|
Loading…
x
Reference in New Issue
Block a user