fatal: Not a git repository (or any of the parent directories): .git
See original GitHub issueI get the following no matter what file I’m investigating:
git rev-parse --show-toplevel (completed in 0.058s)
fatal: Not a git repository (or any of the parent directories): .git
This happens whether I have terminal open at the same location or not.
My seetings file includes:
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"git.path": "C:\\Program Files\\Git\\bin\\git.exe",
"git.confirmSync": false,
"git.enableSmartCommit": true,
"gitProjectManager.baseProjectsFolders": [
"E:\\simonl\\Documents\\_dev"
],
There is definitely a .git folder at the level of the file being investigated.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:50 (4 by maintainers)
Top Results From Across the Web
fatal: Not a git repository (or any of the parent directories): .git
The command has to be entered in the directory of the repository. The error is complaining that your current directory isn't a git...
Read more >Git error - Fatal: Not a git repository and how to fix it | Datree.io
This error means you attempted to run a Git command, but weren't inside a Git repository. Make sure you've: Navigated to the right...
Read more >How to Fix the “fatal: not a git repository” Error - ContainIQ
Make sure you correctly typed the name of the directory. · Check that you correctly created the repo. If the directory doesn't contain...
Read more >fatal: not a git repository (or any of the parent directories): .git
The cause of this error message is running a Git command outside of a directory in which a Git folder is initialized. For...
Read more >fatal: not a git repository (or any of the parent directories): .git
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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You should first run
git init
in your current directory.+1
This basically completely breaks this extension for me - it’s quite rare that I open a git repo as the root directory of the work-space.