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

Time:11-26

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

Any config files needed to be edited?

CodePudding user response:

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.

CodePudding user response:

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.

  • Related