Skip to content

Windows Git Execution Guardrail

When executing git commands (such as git push, git fetch, or git pull) via the terminal on a Windows environment, you MUST prepend the following environment variable exports to the command to prevent the Git Credential Manager (GCM) from spawning blocking GUI prompts.

For PowerShell commands, always format your execution as follows:

$env:GIT_TERMINAL_PROMPT="0"; $env:GCM_INTERACTIVE="never"; git push ...

If the command fails due to missing authentication, do not attempt to bypass it. Instead, kill any stuck background tasks and instruct the user to run the command manually in their interactive terminal.