diff --git a/GitUI/CommandsDialogs/FormRebase.cs b/GitUI/CommandsDialogs/FormRebase.cs index 748999f17c2..6bf3f7384de 100644 --- a/GitUI/CommandsDialogs/FormRebase.cs +++ b/GitUI/CommandsDialogs/FormRebase.cs @@ -386,7 +386,9 @@ private void btnChooseFromRevision_Click(object sender, EventArgs e) try { AppSettings.ShowStashes = false; - using FormChooseCommit chooseForm = new(UICommands, txtFrom.Text, showCurrentBranchOnly: true); + ObjectId firstParent = UICommands.GitModule.RevParse("HEAD~"); + string preSelectedCommit = !string.IsNullOrWhiteSpace(txtFrom.Text) ? txtFrom.Text : firstParent?.ToString() ?? string.Empty; + using FormChooseCommit chooseForm = new(UICommands, preSelectedCommit, showCurrentBranchOnly: true); if (chooseForm.ShowDialog(this) == DialogResult.OK && chooseForm.SelectedRevision is not null) { txtFrom.Text = chooseForm.SelectedRevision.ObjectId.ToShortString();