Skip to content

Commit

Permalink
Change "git reset" default to --mixed
Browse files Browse the repository at this point in the history
Calling "git reset" on the command line (without further arguments) defaults to
--mixed, which is reason enough to make it the default for us, too.

But I also find myself using --mixed more often than --soft. The main use case
for me is that I made a bunch of WIP commits, and want to turn them into real
commits when I'm done hacking. I select the last commit before the WIP commits
and reset to it, leaving all changes of all those commits in the working
directory. Since I want to start staging things from there, I prefer those
modifications to be unstaged at that point, which is what --mixed does.
  • Loading branch information
stefanhaller committed Feb 21, 2024
1 parent b0f3bb7 commit dfabe8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/gui/controllers/helpers/refs_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func (self *RefsHelper) CreateGitResetMenu(ref string) error {
}
strengths := []strengthWithKey{
// not i18'ing because it's git terminology
{strength: "soft", label: "Soft reset", key: 's'},
{strength: "mixed", label: "Mixed reset", key: 'm'},
{strength: "soft", label: "Soft reset", key: 's'},
{strength: "hard", label: "Hard reset", key: 'h'},
}

Expand Down

0 comments on commit dfabe8d

Please sign in to comment.