private static void pushModify() { string wkDir = @"E:DotNet2010单位projectGit.Clientlib2TestConsoleApplication1inDebugD2Git.git"; using (var repo = new Repository(wkDir)) { //此处设置断点,用计事本改动1.txt的内容并保存 FileStatus status = repo.Index.RetrieveStatus("1.txt"); repo.Index.Stage("1.txt"); status = repo.Index.RetrieveStatus("1.txt"); //commit... //push... } Console.Read(); }转载请注明出处:blog.csdn.net/javasuki