Git 模板在克隆时找不到,但在创建时找到

Git Templates not Found on Cloning but on Creating

我在手动设置模板路径后收到警告 templates not found /OurServer/SomeDirectory/GitTemplate。当我查看回购协议时,模板中的挂钩不存在。但是当我创建一个新的 repo 时,所有的钩子都会被复制。

路径是网络路径: 在 Windows 中:\\OurServer\SomeDirectory\GitTemplate 在系统范围内输入 gitconfig:

[init]
    templatedir = "//OurServer/SomeDirectory/GitTemplate"

有趣的是配置中设置的路径之间的区别://OurServer 和错误 /OurServer

如果我把它改成

[init]
    templatedir = "///OurServer/SomeDirectory/GitTemplate"

克隆有效,但随后创建显示错误 templates not found ///OurServer/SomeDirectory/GitTemplate

我在 Windows 7 上使用 git 2.13 和 mingw。

有人有什么建议吗?

如果您将网络驱动器映射到一个驱动器号并配置该驱动器而不是直接配置网络路径,它将起作用。

这似乎是一个错误,您应该将其报告到 Git 邮件列表,这是报告错误的官方方式。