public void AddRemove()
 {
     using (Logger.IndentLog("Add all new files, delete all missing files"))
     {
         _repository.AddRemove();
     }
 }
Exemple #2
0
        public void WriteTextAndCommit(string fileName, string content, string commitMessage = null)
        {
            var path     = Path.Combine(_repository.Path, fileName);
            var fileInfo = new FileInfo(path);
            var message  = GetCommitMessage(fileInfo, commitMessage);

            Directory.CreateDirectory(fileInfo.Directory.FullName);
            File.WriteAllText(fileInfo.FullName, content);

            _repository.AddRemove();
            _repository.Commit(message);
        }