The file will have its original line endings in your working directory error

文章发布于2021年06月21日 18:23, 归类于: 未分类

git 提交代码失败,提示:“The file will have its original line endings in your working directory error:pathspec '正式版'' did not match any file(s) known to git”。

解决

commit -m 'message' 改成双引号

commit -m "message"

其他

在 package.json scripts 内定义了一个脚本如下:

"push_pro":"git add -A && git commit -m 'Build 正式版' && git push -f origin cut-pages"

在 git bash 运行 npm run push_pro时报错:

The file will have its original line endings in your working directory error: pathspec '正式版'' did not match any file(s) known to git

在 package.json scripts 中需要使用斜杆转义双引号。

"push_pro":"git add -A && git commit -m \"Build 正式版\" && git push -f origin cut-pages"

转载请注明来源:《 The file will have its original line endings in your working directory error》- rojerYong's Blog

文章链接:https://www.eoway.cn /article/1624271028.html

如果此文摘取了你的原创,请联系本站管理员,将对此文修改、删除处理。

--END--
上一篇:iPhone 无法连接HBuilder X 解决 下一篇:微信小程序打包,主包和分包都小于2m,却上传失败