Fatal: not a git repository (or any of the parent directories): .git

After kde update and a reboot im getting this error after every command in terminal? Im not using git?

❰greg❙~❱✔≻ ls
 bash         Desktop     Downloads        git               log.txt   Music      Public            python     shield-ftp.txt   Templates   Videos            znotes
 cherrytree   Documents   genral-backups   konsave_log.txt   mount     Pictures   PycharmProjects   quickenx   sounds           testdir    'VirtualBox VMs'   zulu
fatal: not a git repository (or any of the parent directories): .git

Dont know why or what to do.

You appear to be using a themed shell prompt. I strongly suspect that the error would come from the theme package you’re using :thinking:

its fish, this is how my terminal starts up

           Hi Greg
        Welcome to Fish
  Tue 13 Jul 16:37:15 BST 2021
fatal: not a git repository (or any of the parent directories): .git
❰greg❙~❱✔≻ 

I did edit myself but it was so long ago now im not sure i remember how or where, however it looks like you are correct as bash and sh work fine.

I wonder whats happened, fish has worked and started up fine for years and years.

Well, I’ve never used fish but I’m guessing it’s probably to be found in its startup files. I don’t know what fish uses, but could it be something like .fishrc? It’ll either way be a hidden file right under your $HOME.

You could also check whether it uses a system-wide configuration file under /etc. :thinking:

I suppose: you have a .git directory in $HOME (or up) and this directory is not valid : as empty ?

for Aragorn : all user config is in ~./.config/fish/ :wink: it’s very different to bash/zsh

ps: i :green_heart: fish :smiley:

1 Like

Ahh, I figured it in the end, I found fish_prompt - define the appearance of the command line prompt — fish-shell 3.3.1 documentation, followed instructions how to alter the prompt. Switched to another prompt and then back again, and it’s working again.

Thx all :slight_smile: just wish my memory was able to remember what i did multiple years ago (let alone just a month ago)

I pasted the example shown in my config.fish and changes the prompt but when reverted, it still shows the error!!

I’m a beginner, what else i’m supposed to to??

what i did exactly was open my fish terminal, type in fish_config This will open your browser showing a load of options, you need to change to the tab “Prompt”, select a prompt that you’re not currently using then hit “set prompt”. Check if your fish prompt has changed and more importantly check if the git error has gone, if it has try switching back to whatever prompt you want, hit “set prompt” again and should be good.
The browser setting that fish_config takes you to only works while your terminal is “connected” to it, once you exit out on your terminal you need to execute fish_config again to open a new browser config page as the old one will not change your setting any more even though it still is visible.

1 Like

Thanks for the detailed explanation.

I’m using omf for theming of the prompt.

So, when I change the prompt in fish_config, I have to activate it manually, then again the error appears.

Looks like, It has to do something with omf.

Sorry, but that’s my limit of knowledge on this error.

Maybe search and/or post on the fish git. Issues · fish-shell/fish-shell · GitHub

1 Like

Well id say no on that as iv never used oh-my-fish and i had this error after the update too. It may be affecting your ability to fix the problem, but i think there is something going on with fish itself. Good luck with it.

Yeah, you’re right, I’ve downgraded fish to the previous version and the error is gone.

I’ll find some solution later, until then, I’ll stick to the previous one.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.