2017-11-10 5 views
0

어떻게이 오류를 해결할 수 있습니까? 이 최근에 일어난 지금은 커밋 수 없습니다.git commit에서 오류가 발생했습니다. "자동으로 해결할 수없는 오류가 발견되었습니다"

$ git commit -m "tests" 
No syntax errors detected in D:/file.name 
Running Code Sniffer... 
.git/hooks/pre-commit: line 32: ./vendor/bin/phpcs: Is a directory 
Coding standards errors have been detected. Running phpcbf... 
.git/hooks/pre-commit: line 36: ./vendor/bin/phpcbf: Is a directory 
Running Code Sniffer again... 
.git/hooks/pre-commit: line 39: ./vendor/bin/phpcs: Is a directory 
Errors found not fixable automatically 

답변

1

첫째, 당신은 git commit -n -m "..."와 커밋 강제로 다음 --no-확인 옵션은 미리 커밋 후크를 무시합니다.

그러나 두 번째로, 사전 커밋 스크립트가 오류를 유발하는 이유를 확인해야합니다.
선택 규칙 .gitignore에 의해 무시되는 대신 공급 업체 또는 bin과 같은 폴더가 추적되어야한다고 다시 확인하십시오.

git check-ignore -v -- vendor 

둘째, 상기 vendor 폴더를 추적하는 이유가 이미 .gitignore

처음에 추가됩니다 이후가 함께 무시할 경우

난 당신이 확인할 수 모른다 추적 한 경우 로컬로 유지하면서 삭제할 수 있습니다.

git rm --cached -r -- vendor 
git commit -m "Delete vendor" 

그러면 .gitignore 규칙이 즉시 적용됩니다.

+0

고맙습니다. -n 해결했습니다. 하지만 그것은 왜 벤더 폴더가 이미 추가 되었기 때문에 추적되는지 모르겠다. .gitignore –

+0

@HeeroYuy'.gitignore' 문제에 대한 대답을 편집했다. – VonC

+0

나는 벤더를 확인했는데 결과는'.gitignore : 2 :/vendor vendor' –

관련 문제