In PowerShell, git checkout runs without any error message. In the ISE, while git checkout stills works, the ISE gives an error message.
git checkout
It looks like you can now redirect stderr to stdout throughout your powershell script by simply setting an environment variable:
$env:GIT_REDIRECT_STDERR = '2>&1'