private static string GetGitBranch() { var result = string.Empty; var psi = new ProcessStartInfo { Arguments = "/c git branch --show-current", FileName = "cmd.exe", WindowStyle = ProcessWindowStyle.Normal, RedirectStandardOutput = true }; var p = Process.Start(psi); result = p.StandardOutput.ReadToEnd(); p.WaitForExit(); result = result.Replace("\n", string.Empty); return result; }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.