DeGroff Tevie
DeGroff Tevie

Reputation: 45

How to change the default mode of "reset" to "hard" in Tortoisegit?

For my project environment, I prefer to use hard mode to execute a reset.

Any config files needed to be edited?

Upvotes: 2

Views: 90

Answers (2)

mkrieger1
mkrieger1

Reputation: 23139

As far as I understand the source code for the "Reset" dialog in src/TortoiseProc/ResetDlg.cpp, the initial selection for the radio button is hard coded as 1 which means --mixed, so there is no way of configuring it.

CResetDlg::CResetDlg(CWnd* pParent /*=nullptr*/)
    : CHorizontalResizableStandAloneDialog(CResetDlg::IDD, pParent)
    , CChooseVersion(this)
    , m_ResetType(1)
{
}

This has been added in 2009 and has never been changed since.

Upvotes: 3

MrTux
MrTux

Reputation: 34003

As of TortoiseGit 2.12 there is no way to change the default of the reset mode.

Performing a hard reset by mistake also is likely to result in a data loss.

Upvotes: 2

Related Questions