diff --git a/src/ViewModels/FileHistories.cs b/src/ViewModels/FileHistories.cs index 68c5a7a1..5afd4302 100644 --- a/src/ViewModels/FileHistories.cs +++ b/src/ViewModels/FileHistories.cs @@ -79,6 +79,11 @@ namespace SourceGit.ViewModels _repo.NavigateToCommit(commit.SHA); } + public void ResetToSelectedRevision() + { + new Commands.Checkout(_repo.FullPath).FileWithRevision(_file, $"{_selectedCommit.SHA}"); + } + private void RefreshViewContent() { if (_selectedCommit == null) diff --git a/src/Views/FileHistories.axaml b/src/Views/FileHistories.axaml index 6c26fbd3..a00737fb 100644 --- a/src/Views/FileHistories.axaml +++ b/src/Views/FileHistories.axaml @@ -111,7 +111,7 @@ HorizontalAlignment="Center" VerticalAlignment="Center" IsVisible="{Binding IsLoading}"/> - + + +