I am running docker for my Laravel application (BE). I have made a simple update on readmeme.md file and tried to commit & push this file to git.
When I try to commit it this is what I get.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - docker: Error response from daemon: the working directory 'C:/Program Files/Git/var/www/api' is invalid, it needs to be an absolute path. See 'docker run --help'.
Specs:
- Git: git version 2.38.0.windows.1
- Docker version 20.10.17, build 100c701
- My backend is Laravel
CodePudding user response:
The error message comes from a Git hook. Check the .git/hooks
directory if you have set up any Git hooks that invoke Docker. Then find out, why you have them set up and if you need them (e.g. to contribute to a project while adhering to their coding guidelines).
If you don't need them, mark the file as non-executable or delete it. To ignore it for a single commit, pass --no-verify
to git commit
.