diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 55b04713..2f597849 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -243,6 +243,12 @@ namespace SourceGit.ViewModels if (canCherryPick) { + // Sort selected commits in order. + selected.Sort((l, r) => + { + return _commits.IndexOf(r) - _commits.IndexOf(l); + }); + var cherryPickMultiple = new MenuItem(); cherryPickMultiple.Header = App.Text("CommitCM.CherryPickMultiple"); cherryPickMultiple.Icon = App.CreateMenuIcon("Icons.CherryPick");