TortoiseGit - right click on file to commit just that file?

0

1

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.

OJW

Posted 2013-05-10T18:03:27.407

Reputation: 1 257

Answers

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.

Karan

Posted 2013-05-10T18:03:27.407

Reputation: 51 857