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:
- Error husky > pre-commit (node v10.16.3) is reported when git commit is submitted
- Commit failed – exit code 1 received, with output: ‘>running pre-commit hook: npm run precommit (Fixed)
- Git: How to Solve Error: Please commit your changes or stash them before you merge.
- Git push Submit to Remote Error: “remote: Support for password authentication was removed on August 13, 2021.“
- Git pull code error fatal: authentication failed fo
- [Solved] Pre requisite check “checksystemcommandavailable” failed
- Solve the data transfer between vue irrelevant components error: this.$store.commit is not a function
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- How to Fix Error Cannot find command ‘git‘ – do you have ‘git‘ installed and in your PATH?
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- [Solved] fatal: not in a git directory Error: Command failed with exit 128: git
- g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocess
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- [Solved] Response Export error on submit request on future invoke, java.lang.OutOfMemoryError: Java heap space
- [Solved] Git Error: fatal: refusing to merge unrelated histories
- [Solved] Git Error: fatal: refusing to merge unrelated histories
- [Solved] Git error: refname refs/heads/master not found
- [Solved] Eclipse SVN Plug-in Submit Error: org.eclipse.team.svn.core.connector.SVNConnectorException…
- Git Error: refusing to merge unrelated histories [How to Solve]
- There is no error when compiling and packaging the IDEA code, but the code displays an error