question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error:Current directory is not a git directory!

See original GitHub issue

Description

There is an error in v8.2.0,Current directory is not a git directory!

Steps to reproduce

I have this problem when I installed the new version of lint-staged. I think it may be because my .git is in the upper level of the installation directory. install path:/web-front/src-new/node_modules/lint-staged .git path: /web-front/.git

Debug Logs

popo_2019-06-11  11-41-39

Environment

  • OS: macOS High Sierra
  • Node.js: v10.14.1
  • lint-staged: v8.2.0

Ps

This should be because you changed the way get the .git directory in the new version. husky issue: https://github.com/typicode/husky/issues/500 your commit: https://github.com/okonet/lint-staged/commit/6ac666d

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:27 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
bochen2014commented, May 22, 2021

figured it out…

3reactions
okonetcommented, Jun 13, 2019

🎉 This issue has been resolved in version 8.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not a git repository" when attempting to remote add a Git repo
You'll get this error if you try to use a Git command when your current working directory is not within a Git repository....
Read more >
Git error - Fatal: Not a git repository and how to fix it | Datree.io
A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in...
Read more >
Solving “Fatal: Not A Git Repository” (Or Any Of The Parent ...
The error above, fatal: not a git repository (or any of the parent directories): .git , states that you tried to execute a...
Read more >
How to Fix the “fatal: not a git repository” Error - ContainIQ
In short, the fatal: not a git repository error indicates that your current working directory isn't tracked by Git. If you find yourself...
Read more >
fatal: not a git repository (or any of the parent ... - Initial Commit
What the error is telling you is that you issued a Git command, (usually within a command line shell), inside a directory that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found