Adding command to checkout commit

This commit is contained in:
Filipe Ramalho 2024-05-25 14:27:42 -03:00
parent 12d7fa6670
commit 8aeb7ed17c

View file

@ -62,6 +62,14 @@ namespace SourceGit.Commands
return Exec();
}
public bool Commit(string commitId, Action<string> onProgress)
{
Args = $"checkout --detach --progress {commitId}";
TraitErrorAsOutput = true;
_outputHandler = onProgress;
return Exec();
}
public bool Files(List<string> files)
{
StringBuilder builder = new StringBuilder();