Skip to content

Commit 8aeb7ed

Browse files
committed
Adding command to checkout commit
1 parent 12d7fa6 commit 8aeb7ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Commands/Checkout.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ public bool FileWithRevision(string file, string revision)
6262
return Exec();
6363
}
6464

65+
public bool Commit(string commitId, Action<string> onProgress)
66+
{
67+
Args = $"checkout --detach --progress {commitId}";
68+
TraitErrorAsOutput = true;
69+
_outputHandler = onProgress;
70+
return Exec();
71+
}
72+
6573
public bool Files(List<string> files)
6674
{
6775
StringBuilder builder = new StringBuilder();

0 commit comments

Comments
 (0)