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.

fatal: Not a git repository (or any of the parent directories): .git

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:50 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
peinrulescommented, Sep 11, 2019

You should first run git init in your current directory.

9reactions
wolf99commented, Feb 13, 2018

+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.

Read more comments on GitHub >

github_iconTop 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 >

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