【发布时间】:2017-11-20 06:29:23
【问题描述】:
当我在 git commit 消息中使用路径规范时,它们会在系统绝对路径中解析!
例如
git commit -m "/tools/controller subproject moved to submodule"
会导致
C:/Program Files/Git/tools/controller subproject moved to submodule
如何关闭此“功能”?
我的 git 版本是2.12.0.windows.1。
【问题讨论】:
-
尝试单引号而不是双引号。或者只是
git commit并通过 vim 添加消息。 -
@jonrsharpe,非常感谢!它对我有用!
-
这似乎是 Git Bash 中的一个错误;我已经为它开了一个issue。
-
如果您以
/开头的路径,是它是相对路径吗?
标签: git relative-path commit-message