Using loProcess As New Process loProcess.StartInfo.FileName = lcFileName loProcess.StartInfo.WorkingDirectory = lcWorkingDirectory loProcess.StartInfo.Arguments = lcArguments loProcess.StartInfo.RedirectStandardOutput = lRedirectStandardOutput loProcess.Start() ' Wait for the process to complete before proceeding loProcess.WaitForExit()Where the Git command is something like:
"C:\Program Files\Git\git-bash.exe" Script.txtThis works. The problem, however, is that, because git-bash executes a script file, the DOS interpreter thinks it's done with it and releases the process immediately to .NET, so the WaitForExit() has no effect.