Reason: the keyword is husky > Baidu found the problem after pre-commit. It was really a file under. Git in the local project that caused the submission failure. This file is a pre-commit file.
Solution steps:
1. Find the .Git folder in the project (you need to display the hidden files before they appear. To display the hidden files: click View Options view show hidden files to confirm). Double click to enter and you can see some files about GIT
2. Go to the .Git folder, go to the hooks folder, and find the pre-commit file.
Pre-commit (client) hook, which will run to check the code style before git types the submission information
If the code does not comply with the corresponding rules, an error is reported.
3. After deleting the file, we commit and find that it can be submitted successfully.
Second question:
Prompt when git pushes: refs cannot be pushed to the remote end
Solution: pull the mainline code again, merge, resolve the conflict, resubmit, and then push to the remote end.
Read More:
- [Solved] Error: SRC refspec master doors not match any
- Commit failed – exit code 1 received, with output: ‘>running pre-commit hook: npm run precommit (Fixed)
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- [step on the pit] idea submits the code to GitHub and prompts 403 — the requested URL returned error: 403
- [Solved] error: Pulling is not possible because you have unmerged files
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- [Solved] Git error: refname refs/heads/master not found
- hint: Updates were rejected because the remote contains work that you do To XXX
- Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“
- [Solved] Git push Error: unpacker error 000000000000
- [Solved] Chrome submission error: Form submission canceled because the form is not connected
- Git: How to Solve Error: Please commit your changes or stash them before you merge.
- [Solved] PostgreSQL Error: ERROR: CURRENT TRANSACTION IS ABORTED, COMMANDS IGNORED UNTIL END OF TRANSA
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- SVN Update Error Please execute the ‘Cleanup‘ command [How to Solve]
- Error husky > pre-commit (node v10.16.3) is reported when git commit is submitted
- Git Pull Error:The following untracked working tree files would be overwritten by merge
- [Solved] github Access Error: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
- Solve the data transfer between vue irrelevant components error: this.$store.commit is not a function
- [Solved] Redis Startup Error: FATAL CONFIG FILE ERROR