# Change the current directory to the Scripts directory cd "C:\Scripts" # Add exception handling for the git pull command git config --global --add safe.directory C:/Scripts # Execute the git pull command git pull # Optional: Check the exit code of the git pull command $LASTEXITCODE # Optional: Display a message based on the exit code if ($LASTEXITCODE -eq 0) { Write-Host "git pull successful." } else { Write-Host "git pull failed." }