Reputation: 596
I'm using github for windows with git-lfs, committed the changes to the local branch which were done successfully, then gave an error after i tried to sync to the remote. Trying pushing my changes from the git shell and this error came up
error: cannot spawn .git/hooks/pre-push: No such file or directory
error: waitpid for .git/hooks/pre-push failed: No child processes
I then pushed by
git push --no-verify
it did get pushed but I tried downloading the files and they gave a 404 error. Any change that i commit gives the same error of the pre-push hook.
Upvotes: 13
Views: 14934
Reputation: 101
Run :
git lfs update --force
And update theis file : .husky\pre-push
#!/bin/sh
npm run lint && npm audit && npm test
Then :
git push
Upvotes: 0
Reputation: 6736
I had to change the directory separation character in core.hooksPath
to get rid of that error.
So e.g. in ~/.gitconfig
I changed
[core]
hooksPath = "C:\\Users\\MyUser\\MyHooks"
to
[core]
hooksPath = "//c/Users/MyUser/MyHooks"
Upvotes: 0
Reputation: 683
In my case, the hook was in windows wsl
with a non-existent shebang. A symlink using ln -s
fixed the issue.
Upvotes: 1
Reputation: 596
Found the solution. Deleted the pre-push hook in the .git/hooks folder Installed git lfs again. Issue was fixed.
Upvotes: 24