Skip to content

Commit fd234df

Browse files
committed
git-gui: Add Reset to the Branch menu.
cehteh on #git noticed that there was no way to perform a reset --hard from within git-gui. When I pointed out this was Merge->Abort Merge cehteh said this is not very understandable, and that most users would never guess to try that option unless they were actually in a merge. So Branch->Reset is now also a way to cause a reset --hard from within the UI. Right now the confirmation dialog is the same as the one used in Merge->Abort Merge. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 9b28a8b commit fd234df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git-gui.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5256,6 +5256,12 @@ if {[is_enabled branch]} {
52565256
-font font_ui
52575257
lappend disable_on_lock [list .mbar.branch entryconf \
52585258
[.mbar.branch index last] -state]
5259+
5260+
.mbar.branch add command -label {Reset...} \
5261+
-command do_reset_hard \
5262+
-font font_ui
5263+
lappend disable_on_lock [list .mbar.branch entryconf \
5264+
[.mbar.branch index last] -state]
52595265
}
52605266

52615267
# -- Commit Menu

0 commit comments

Comments
 (0)