GIT.mailmap works for a repo, but not globally, why?

I have a group of repositories and I have a .mailmap file for combining usernames.

My .mailmap file works for all repos when it is at the root of each of them.

I tried putting the file in the ~ / .gitconfig file and it does not work. I use Git for Windows and in my global .gitconfig file I added the following:

>> git config --global mailmap.file "~/.mailmap" 

This is the command I used. Also tried the magazine shown below.

 [log] mailmap = ~/.mailmap [mailmap] file = C:/Documents and Settings/<username>/.mailmap 

Both lead to the same file, but apparently it doesn't respect this file when using git-shortlog

Any suggestions? Thanks.

EDIT There has never been a git for working with windows. My fix was to save the mailmap file in the database and write it to each repository using a script.

+5
source share
1 answer

.gitconfig at my .gitconfig , I see that all window paths are written using two backslashes, such as

 [difftool "kdiff3"] path = C:\\Program Files\\KDiff3\\kdiff3.exe 

This works for me.

Maybe you should write

 [mailmap] file = C:\\Documents and Settings\\<username>\\.mailmap 

to make everything work. Alternatively, you can try the git-style path declaration, as

 [mailmap] file = /c/Documents\ and\ Settings/<username>/.mailmap 
+1
source

All Articles