Josh Johnson Josh Johnson - 6 months ago 34
Git Question

"bash: __gitdir: command not found" error in terminal

Whenever I'm working in the command window, I get the error: "bash: __gitdir: command not found" right above the working line (in other words, right after any command, before it prompts for a new one).

Any ideas as to what is going on to bring this up?


You probably have something calling that command in your .bashrc file.

Try searching for __gitdir in it:

$ grep __gitdir ~/.bashrc

Or maybe post its content, and it will probably be easier to help.