我在 Windows 10 中工作,并尝试使用 npm 脚本进行 git commit,其中包含包含提交日期和时间的消息:
"deploy": "cd dist && git add . && git commit -m \"Release at $(date)\" && git push"
Run Code Online (Sandbox Code Playgroud)
结果 git commit 消息是
在 $(date) 发布
代替
于 03/06/2019 11:43:57 发布
我在终端中运行相同的命令时得到:
git commit -m "Release at $(date)"
Run Code Online (Sandbox Code Playgroud)
什么是跨平台解决方案?
你能解释导致不同结果的原因吗?