Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git pre-push issue no such file or directory

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.

like image 728
WajeehHassan Avatar asked Feb 17 '26 08:02

WajeehHassan


2 Answers

Found the solution. Deleted the pre-push hook in the .git/hooks folder Installed git lfs again. Issue was fixed.

like image 147
WajeehHassan Avatar answered Feb 18 '26 21:02

WajeehHassan


Run git lfs update --force to override corrupted hooks.

like image 43
Brackets Avatar answered Feb 18 '26 20:02

Brackets