@@ -1866,21 +1866,6 @@ public ContextMenu CreateContextMenuForLocalBranch(Models.Branch branch)
18661866 } ;
18671867 menu . Items . Add ( fastForward ) ;
18681868
1869- var selectedCommit = ( _histories ? . DetailContext as CommitDetail ) ? . Commit ;
1870- if ( selectedCommit != null && ! selectedCommit . SHA . Equals ( branch . Head , StringComparison . Ordinal ) )
1871- {
1872- var move = new MenuItem ( ) ;
1873- move . Header = App . Text ( "BranchCM.ResetToSelectedCommit" , branch . Name , selectedCommit . SHA . Substring ( 0 , 10 ) ) ;
1874- move . Icon = App . CreateMenuIcon ( "Icons.Reset" ) ;
1875- move . Click += ( _ , e ) =>
1876- {
1877- if ( CanCreatePopup ( ) )
1878- ShowPopup ( new ResetWithoutCheckout ( this , branch , selectedCommit ) ) ;
1879- e . Handled = true ;
1880- } ;
1881- menu . Items . Add ( move ) ;
1882- }
1883-
18841869 var fetchInto = new MenuItem ( ) ;
18851870 fetchInto . Header = App . Text ( "BranchCM.FetchInto" , upstream . FriendlyName , branch . Name ) ;
18861871 fetchInto . Icon = App . CreateMenuIcon ( "Icons.Fetch" ) ;
@@ -1924,6 +1909,25 @@ public ContextMenu CreateContextMenuForLocalBranch(Models.Branch branch)
19241909 menu . Items . Add ( rebase ) ;
19251910 }
19261911
1912+ if ( worktree == null )
1913+ {
1914+ var selectedCommit = ( _histories ? . DetailContext as CommitDetail ) ? . Commit ;
1915+ if ( selectedCommit != null && ! selectedCommit . SHA . Equals ( branch . Head , StringComparison . Ordinal ) )
1916+ {
1917+ var move = new MenuItem ( ) ;
1918+ move . Header = App . Text ( "BranchCM.ResetToSelectedCommit" , branch . Name , selectedCommit . SHA . Substring ( 0 , 10 ) ) ;
1919+ move . Icon = App . CreateMenuIcon ( "Icons.Reset" ) ;
1920+ move . Click += ( _ , e ) =>
1921+ {
1922+ if ( CanCreatePopup ( ) )
1923+ ShowPopup ( new ResetWithoutCheckout ( this , branch , selectedCommit ) ) ;
1924+ e . Handled = true ;
1925+ } ;
1926+ menu . Items . Add ( new MenuItem ( ) { Header = "-" } ) ;
1927+ menu . Items . Add ( move ) ;
1928+ }
1929+ }
1930+
19271931 var compareWithHead = new MenuItem ( ) ;
19281932 compareWithHead . Header = App . Text ( "BranchCM.CompareWithHead" ) ;
19291933 compareWithHead . Icon = App . CreateMenuIcon ( "Icons.Compare" ) ;
0 commit comments