首页 > 代码库 > git for c#,子文件的添加

git for c#,子文件的添加

        private static void SubDirFile()
        {
            string wkDir = @"E:\DotNet2010\单位工程\Git.Client\lib2Test\ConsoleApplication1\bin\Debug\D2Git\.git";
            using (var repo = new Repository(wkDir))
            {
                //必须保证工作目录下有bb目录,和目录下的b.txt
                string fname = "dd\\b.txt";
                repo.Index.Stage(fname);

                //commit...
                //push...
            }
        }
转载请注明出处:blog.csdn.net/javasuki