vat-software/scripts/shared_sw/git-fix.bat
2025-06-02 11:08:03 +02:00

33 lines
1.3 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM -------------------------------------------------------------
REM Script: update-vat-software.bat
REM Description: Navigate to %USERPROFILE%\Documents\VAT-Software
REM and update the Git remote, fetch all changes,
REM and reset to origin/master.
REM -------------------------------------------------------------
REM Change directory to the VAT-Software folder under the current user's Documents
cd /d "%USERPROFILE%\Documents\VAT-Software" || (
echo Folder "%USERPROFILE%\Documents\VAT-Software" not found.
pause
exit /b 1
)
REM -------------------------------------------------------------
REM OPTION 1: Embed credentials in the remote URL to avoid prompts.
REM Replace <YOUR_PASSWORD> with the actual password for vat_emp.
REM -------------------------------------------------------------
git remote set-url origin https://vat_emp:k0rej%24k%4015@gitea.bangus-deneb.ts.net/t0is/vat-software.git
REM If youd rather enter credentials manually, comment out the previous line and uncomment below:
REM git remote set-url origin https://gitea.bangus-deneb.ts.net/t0is/vat-software.git
REM Fetch all branches and tags from the remote
git fetch --all
REM Force-reset the local master branch to match origin/master
git reset --hard origin/master
echo.
echo Repository has been updated to origin/master.
pause