@echo off
setlocal

for /f "delims=" %%b in ('git rev-parse --abbrev-ref HEAD') do set "BRANCH=%%b"

if "%BRANCH%"=="" (
    echo Unable to determine current branch.
    exit /b 1
)

git pull --ff-only origin "%BRANCH%"
if errorlevel 1 (
    exit /b 1
)

echo Git synchronization complete.
