The check for Git was originally in flutter.bat but was removed by
b84bfa3526
in order to improve performance.
It was later brought back in
bc4fc5ffb9.
However, that change added it to a subroutine in shared.bat. If Git is
not found then shared.bat would exit the shell process to stop retries
of the subroutine.
This PR moves the check back into flutter.bat and exits the script
without quitting the shell.
Fixes https://github.com/flutter/flutter/issues/169784