Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

bash

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?

like image 766
Josh Johnson Avatar asked May 05 '26 07:05

Josh Johnson


1 Answers

__gitdir is a function supplied by the git-completion.bash script that lets bash do auto-complete when you type git commands. Are you using __gitdir in your .bashrc or other profile/login script without sourcing git-completion.bash?

like image 100
Mike Seplowitz Avatar answered May 06 '26 22:05

Mike Seplowitz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!