-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal: not a git repository: '.git' | Inside a subdirectory (Not Monorepo) #584
Comments
Hi @Nikodermus, That's weird, could you try re-installing and doing a It should give the current directory where |
npm install -D husky
HUSKY_DEBUG=1 git commit
folder structure
|
Thanks, install seems to work this time.
Pre-commit script is running in Can you try changing: "pre-commit": "yarn test && yarn lint-staged && yarn build && git add dist",
// to
"pre-commit": "yarn test && yarn lint-staged && yarn build && pwd && echo $GIT_DIR && git add dist", |
Yeah installing seems good now tho...
|
Can you try to unset GIT_DIR? "pre-commit": "yarn test && yarn lint-staged && yarn build && pwd && unset GIT_DIR && echo $GIT_DIR && git add dist" |
Thanks!, Hooks are now triggering ok, with the changes you proposed + jumping to husky@next but the commitizen hook is not working, should I now open a issue with them?` It stops the commit due to empty message when in a regular repo starts the comitizen CLI .huskyrc
package.json
git commit
|
It seems to be the same kind of error
|
Adding the |
Hey guys, I'm using husky in a subfolder which is the only one with a package.json, and when I try to install husky, it gives me the following error
My folder structure is
I'm using 3.0.7 (just installed it).
When I run manually
git rev-parse --show-toplevel --absolute-git-dir
it gives me the path and the git folderActually the hooks do run
but then the error
The text was updated successfully, but these errors were encountered: