How to share TortoiseGit settings between multiple machines

How to share TortoiseGit settings between multiple machines

The official documentation says:

If you want to export all your client settings to use on another computer you can do so using the Windows registry editor regedt32.exe. Go to the registry key HKCU\Software\TortoiseGit and export it to a reg file. On the other computer, just import that file again (usually, a double click on the reg file will do that).

Remember to save Git’s general settings, which you can find in the Git configuration file .gitconfig and/or the folder .config/git which both are located in your user profile directory.

Unfortunately, in general it may not be so simple:

  • There are some values which should probably never be shared between different TortoiseGit installations, e.g. CurrentVersion.
  • There are some values which you may not want to share between installations, e.g. those beneath the subkey HKEY_CURRENT_USER\SOFTWARE\TortoiseGit\History if you have one installation at home and one at work.
  • Some values will only be created when you change the configuration to be different then the default. E.g., a new installation will not have any values for context menu configuration. If you would use a .reg file on another new installation, that would not be a problem. But if the other installation would already have values for non-default configuration, you would not overwrite the non-default configuration with the default configuration by importing a .reg file.

Thus, you must carefully pick all the values you want to share. If you want to share default values, you must first deviate from the default values so that the values will be saved to the registry and then revert back to the default values, which will then be saved to the registry as well.

I can not offer you a complete solution, but I will now walk you through the settings that I like to share between installations and show you how to set them with PowerShell.

Settings > General > Context Menu

The values are named ContextMenuEntries and ContextMenuEntrieshigh (not ContextMenuEntriesHigh). They seem to be the two halfs of a bit field where each bit represents a context menu item checked or unchecked.

You can make them appear in the registry by selecting all items, saving, restoring to default values and saving again. At the time of writing – using TortoiseGit – the defaults are 1030 and 32, respectively (in decimal notation).

Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "ContextMenuEntries" 1030
Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "ContextMenuEntrieshigh" 32

Settings > General > Context Menu 2

The values are named ContextMenuExtEntriesLow and ContextMenuExtEntriesHigh and work analogous to those in the context menu.

At the time of writing, the defaults are 1073741824 and 73728, respectively.

Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "ContextMenuExtEntriesLow" 1073741824
Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "ContextMenuExtEntriesHigh" 73728

Settings > Diff Viewer

If you configure a custom diff viewer, the command to call it will be saved in the value named Diff. For using the built-in diff viewer, this value must be absent or prefixed with #.

$DiffMergePath = "C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe"
$DiffMergeArguments = "/title1=%bname /title2=%yname %base %mine"
$Value = $DiffMergePath + " " + $DiffMergeArguments
Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "Diff" $Value

Settings > Diff Viewer > Merge Tool

This works analogous to the diff viewer, using the value named Merge.

$DiffMergePath = "C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe"
$DiffMergeArguments = 
    "/merge /caption=%mname /result=%merged /title1=%yname /title2=%bname /title3=%tname %mine %base %theirs"
$Value = $DiffMergePath + " " + $DiffMergeArguments
Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit" "Merge" $Value

Log dialog > Columns

The column configuration is located in the subkey HKEY_CURRENT_USER\SOFTWARE\TortoiseGit\StatusColumns. I am only interested in logloglist and logloglist_Order.

Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit\StatusColumns" "logloglist" 1f1
Set-ItemProperty "HKCU:\SOFTWARE\TortoiseGit\StatusColumns" "logloglist_Order" "000102030405060809070A0B0C0D"


Note that there is no gurantee that this approach will be compatible with future versions of TortoiseGit,
because the registry keys and values it uses do not constitute a public API and could thus be subject to
changes anytime. I have filed a feature request
addressing this.

Example script

At GitHub, you can find my personal configuration script

Revision history

  • 2024-01-06:
    • fix: replace unintended hex values with decimal values; replace script link with link to fixed version
    • add caveat paragraph
Music Technology

Using Cubase MIDI sends for unison parts

A case can be made for always using instrument tracks instead of MIDI tracks + rack instruments in Cubase, except for hardware instruments. While I think instrument tracks do not handle multiple-output instruments well, there is yet another valid use case for using MIDI tracks with software instruments: Instruments that often play the same parts – i.e., instruments that often play in unison.

I say often, because if you want multiple instruments to always play in unison, you can simply use a multi-timbral instrument, and if you want them to occasionally play in unison, you can simply create a shared copy of the part. A very common use case are double-tracked rhythm guitars in metal music.

I assume that you already have set up two instrument tracks (or MIDI tracks + rack instruments) for double-tracking. These are called Guitar Left and Guitar Right. Now you can add an additional MIDI track Guitar Left/Right in between these instrument tracks (or MIDI tracks). In the inspector of the new track, you can then configure the MIDI sends.

The tracks and MIDI sends

You can even insert a MIDI effect before the send. E.g., you could use a MIDI modifier so that one of the instruments would play the part transposed by an octave.

MIDI modifiers for MIDI sends

Note that MIDI insert effects in the destination tracks will not be effective for the sent MIDI data.

The advantage of the method described here over shared copies is that you have a better visual indication of which parts are in unison and which are not.

Distribution of parts to the three tracks


Distribution of parts to only two tracks

The disadvantage is that there is the overhead of one more track. Possibly, there is also the disadvantage of using MIDI sends at all, because I have experienced Cubase sometimes unexpectedly disconnecting them. This is or was obviously a bug, but I cannot reliably reproduce it.

Tested with Cubase 9.5.50.