Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
需要Git提交错误的建议吗_Git_Github - Fatal编程技术网

需要Git提交错误的建议吗

需要Git提交错误的建议吗,git,github,Git,Github,我在git上遇到此错误,无法再提交更改。 我没有在Git上做过很多工作,也不确定我应该做什么才能通过错误 ✖ EPERM: operation not permitted, open 'C:\Git\visualization… ↓ Skipped because of previous git error. [SKIPPED] ↓ ✖ lint-staged failed due to a git error. [SKIPPED] ↓ ✖ lint-staged failed due

我在git上遇到此错误,无法再提交更改。 我没有在Git上做过很多工作,也不确定我应该做什么才能通过错误

✖ EPERM: operation not permitted, open 'C:\Git\visualization…
↓ Skipped because of previous git error. [SKIPPED]
↓
  ✖ lint-staged failed due to a git error. [SKIPPED]
↓
  ✖ lint-staged failed due to a git error. [SKIPPED]

  ✖ lint-staged failed due to a git error.
  Any lost modifications can be restored from a git stash:

    > git stash list
    stash@{0}: automatic lint-staged backup
    > git stash apply --index stash@{0}

husky > pre-commit hook failed (add --no-verify to bypass)
当我执行git status时,它只给我需要提交的文件名

MINGW64 /c/git/visualization (405)
$ git status
On branch 405
Your branch is up to date with 'origin/405'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   map/components/Graph.tsx

您正在处理的存储库有一个因某种原因而失败的存储库。预提交钩子是git在每次提交时运行的脚本


您可能可以通过移动或删除
.git/hooks/pre-commit
文件绕过钩子,但最好查看该文件中的内容并修复根本问题。

我可以通过关闭所有git应用程序和cmd行来解决它。似乎我打开了git bash应用程序和git bash cmd行,它们造成了重叠。关闭所有这些,错误消失。

如果在提交之前不需要验证,则:
git commit-m“new commit”-无需验证

谢谢@Adam,我正在发布预提交文件的内容,请在更新2下进行检查。最近一次更改是7/22,我每天都在提交代码。看起来像是husky里面的任何东西。sh正在试图对一个文件运行
open
,但它没有权限这样做。有关文件系统权限的某些内容必须已更改。谢谢您的帮助。我可以通过关闭我所有的git应用程序和cmd行来解决这个问题。我想我们需要husky.sh的内容
# Created by Husky v4.2.5 (https://github.com/typicode/husky#readme)
#   At: 7/22/2020, 1:52:38 PM
#   From: undefined (https://github.com/typicode/husky#readme)

. "$(dirname "$0")/husky.sh"