public void Execute() { StatusCommand status = new StatusCommand(_callDirectory); Stage stage = status.GetCurrentStage(); FileSystem customFileSystem = new FileSystem(stage.Tracked, _callDirectory); CustomFileSystem.Directory directory = customFileSystem.GetContent(); Path startPath = _callDirectory.GetCommonDirectory(); Tree tree = directory.ConvertIntoTree(_callDirectory, startPath); tree.CreateTreeObject(_callDirectory); string commitMessage = String.Empty; if (_command.Properties.Count > 0) { commitMessage = _command.Properties[0]; } Commit commit = new Commit(tree.Hash, commitMessage, ""); Hash hash = commit.CreateCommitObject(_callDirectory); UpdateCommitReference(hash); }