(最初是在 Git 邮件列表和Git For Windows 邮件列表上询问的,到目前为止没有任何回应。)
问题
在运行命令时,我注意到子模块初始化期间命令git clone --recurse-submodules https://repo的奇怪输出:git
Submodule 'Binary/A' (https://repo) registered for path '!f() { ~/AppData/Local/Fork/Fork.exe $PWD; }; fBinary/A'
Submodule 'Binary/B' (https://repo) registered for path '!sh -c 'git log $1@{1}..$1@{0} $@'Binary/B'
Submodule 'Binary/C' (https://repo) registered for path 'ls-files -o -i --exclude-standardBinary/C'
Submodule 'Binary/D' (https://repo) registered for path 'mergetool.TortoiseGitMerge.trustexitcodeBinary/D'
该命令似乎运行良好并且成功完成。
部分诊断
我设法确定注入子模块打印路径的垃圾是什么。它来自我配置的 git 别名,例如,~/.gitconfig其中包括:
[include]
path = ~/alias_misc.gitconfig
里面~/alias_misc.gitconfig有这个别名
[alias]
fapp = "!f() { ~/AppData/Local/Fork/Fork.exe $PWD; }; f"
它被插入到上面复制Binary/A的输出中的路径中。git clone
(所有文件都可以在 GitHub 上找到)。
问题
谁能解释为什么git在其输出中随机插入别名定义?
我的 Git 配置文件有什么问题吗?