Process p = new Process();
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "git";
psi.Arguments = "log --pretty=format:\"[`%h` (%s by %cn)]\" -n 1";
psi.WorkingDirectory = @"C:\Users\Samuel\Documents\GitHub\Phamhilator";
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.CreateNoWindow = true;
p.StartInfo = psi;
p.Start();
string output = p.StandardOutput.ReadToEnd();
output = p.StandardError.ReadToEnd();
p.WaitForExit();
p.Dispose();