Sorry to necro this old post, but I couldn't see a solution anywhere else, and this might be of use to someone.
Note: Adding a HOME path to the PROFILE file in C:\Program Files\Git\etc
does not relocate/re-path .minttyrc
from the default installation folder. Instead you need to set a Windows Environmental Variable
This applies to Windows 10 Pro, Git 2.34.1
Let's say I want my .minttyrc
to be read by Git Bash in C:\Users\Administrator\git
instead of the default installation location, which for me is C:\Users\Administrator
Open Control Panel
In the Search box (top right on my screen), type: Advanced system settings
Then under the 'System' heading, click 'View advanced system settings'
A System Properties box will open, with the Advanced tab selected
At the bottom of this box, click Environment Variables. The Environment Variables box will open.
If you are just adding a $home variable for yourself, then click 'New' under 'User Variables'
- Variable Name:
HOME
- Variable Value: Path to your custom git folder where you want
.minttyrc
to be located (for me, this is C:\Users\Administrator\git
)
- On a multi-user system, click 'New' under 'System Variables'
- Variable Name:
HOME
- Variable Value:
%USERPROFILE%\path-to-your-custom-git-folder
(for me, I would add: %USERPROFILE%\git
)
Now Git Bash will read and store configuration settings in .minttyrc
in your custom Git folder
Note: You might need to be careful setting HOME in the System Variables - I'm unsure if other software might also use the HOME variable
Alternative: You can set a global 'minttyrc' by creating a file called minttyrc
(no extension) in the folder C:\Program Files\Git\etc
Using this alternative method you can avoid setting Environmental Variables, but the settings in minttyrc
at this location will apply globally