被忽略子文件夹中的文件名对GIT来说太长
我试图在Github中从VS代码执行一个简单的提交 这是控制台上的输出:被忽略子文件夹中的文件名对GIT来说太长,git,visual-studio-code,Git,Visual Studio Code,我试图在Github中从VS代码执行一个简单的提交 这是控制台上的输出: git add -A -- . warning: LF will be replaced by CRLF in dist/factory-method-web-part.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in lib/webparts
git add -A -- .
warning: LF will be replaced by CRLF in dist/factory-method-web-part.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/webparts/factoryMethod/components/FactoryMethod.d.ts.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/webparts/factoryMethod/components/FactoryMethod.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in lib/webparts/factoryMethod/components/ListItemFactory.js.
The file will have its original line endings in your working directory.
error: open("node_modules/@microsoft/office-ui-fabric-react-bundle/node_modules/office-ui-fabric-react/lib-amd/components/ChoiceGroup/examples/ChoiceGroup.Custom.Example.scss.d.ts"): Filename too long
error: unable to index file node_modules/@microsoft/office-ui-fabric-react-bundle/node_modules/office-ui-fabric-react/lib-amd/components/ChoiceGroup/examples/ChoiceGroup.Custom.Example.scss.d.ts
fatal: updating files failed
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
git rev-parse --symbolic-full-name --abbrev-ref master@{u}
git rev-list --left-right master...origin/master
git for-each-ref --format %(refname) %(objectname)
git remote --verbose
这是my.gitignore文件的内容:
# Logs
logs
*.log
npm-debug.log*
# Dependency directories
node_modules
# Build generated files
dist
lib
solution
temp
*.sppkg
# Coverage directory used by tools like istanbul
coverage
# OSX
.DS_Store
# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj
# Resx Generated Code
*.resx.ts
# Styles Generated Code
*.scss.ts
为什么GIT/VSCODE试图在node_模块下提交一个应该忽略的文件?您必须在gitignore文件中的node_模块条目中附加一个斜杠。对于所有其他目录条目,如覆盖率目录,也是如此 gitignore文件中的固定行与下面代码段中的固定行类似
# Dependency directories
node_modules/
# Coverage directory used by tools like istanbul
coverage/
您必须在gitignore文件中的node_modules条目中附加一个斜杠。对于所有其他目录条目,如覆盖率目录,也是如此 gitignore文件中的固定行与下面代码段中的固定行类似
# Dependency directories
node_modules/
# Coverage directory used by tools like istanbul
coverage/
我也有同样的错误,这是因为git配置限制了文件名的长度。可能的解决方案之一是以管理员身份使用以下命令更改此配置。祝你好运
git config--system core.longpaths true
我遇到了相同的错误,这是因为git配置限制了文件名的长度。可能的解决方案之一是以管理员身份使用以下命令更改此配置。祝你好运
git config--system core.longpaths true
但是为什么它试图提交节点模块文件夹,它应该被忽略?我已经改变了问题,不需要做-1但是为什么它试图提交节点模块文件夹,它应该被忽略?我已经改变了问题,不需要做-1