public void EditIngoreFile()
{
var ignoreFile = Path.Combine(WorkingDirectory, ".gitignore");
var ret = GitBash.Run("config core.editor", WorkingDirectory);
if (!ret.HasError && ret.Output.Trim() != "")
{
var editor = ret.Output.Trim();
if (editor.Length == 0) editor = "notepad.exe";
var cmd = string.Format("{0} \"{1}\"", editor, ignoreFile);
cmd = cmd.Replace("/", "\\");
var pinfo = new ProcessStartInfo("cmd.exe")
{
Arguments = "/C \"" + cmd + "\"",
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = this.WorkingDirectory,
};
Process.Start(pinfo);
}
}