0

TortoiseGit uses a [Windows Explorer] context-menu "Git commit -> master" to commit changes.

Is it possible to configure this so that by default it only commits the file you right-clicked on (when opening the context menu), instead of all modified files in the repository?

i.e. in a directory with lots of changes, we don't want to "select none" and then find our one file in the "Changes made" list, given that we already 'chose' that file in the Explorer window.

0

2 Answers 2

0

I'm just basing this answer on information found here, but you'll have to try it and get back to me:

  1. Find out where TortoiseGitProc.exe is located

  2. Save the following as a .REG file after editing in the proper path to the EXE (don't mess up the double backslashes!), then double-click to merge into your registry:

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\commit]
    @="Comm&it"
    
    [HKEY_CLASSES_ROOT\*\shell\commit\command]
    @="\"C:\\Path\\to\\TortoiseGitProc.exe\" /command:commit /path:\"%1\" /logmsg:\"Committing single file\" /closeonend:0"
    
  3. Right-click any file, click on Commit and see if it worked.

0

Open the TortoiseGit "Settings" screen Open the "General/Dialogs 2" menu Find the "Commit" section Uncheck the "Select items automatically" option Click "Apply" Click "Ok"

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jan 11, 2022 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .