@@ -1866,21 +1866,6 @@ public ContextMenu CreateContextMenuForLocalBranch(Models.Branch branch)
1866
1866
} ;
1867
1867
menu . Items . Add ( fastForward ) ;
1868
1868
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
-
1884
1869
var fetchInto = new MenuItem ( ) ;
1885
1870
fetchInto . Header = App . Text ( "BranchCM.FetchInto" , upstream . FriendlyName , branch . Name ) ;
1886
1871
fetchInto . Icon = App . CreateMenuIcon ( "Icons.Fetch" ) ;
@@ -1924,6 +1909,25 @@ public ContextMenu CreateContextMenuForLocalBranch(Models.Branch branch)
1924
1909
menu . Items . Add ( rebase ) ;
1925
1910
}
1926
1911
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
+
1927
1931
var compareWithHead = new MenuItem ( ) ;
1928
1932
compareWithHead . Header = App . Text ( "BranchCM.CompareWithHead" ) ;
1929
1933
compareWithHead . Icon = App . CreateMenuIcon ( "Icons.Compare" ) ;
0 commit comments