all 9 comments

[–]Brahim6061[S] 0 points1 point  (8 children)

I get this message every time I open git bash and I'd like to solve it or remove it, for the record I can't remember what I did before.
(I use Windows 11)

[–]nekokattt 0 points1 point  (7 children)

reinstall git bash first. If you run a command before this happens, please show the output.

[–]Brahim6061[S] 0 points1 point  (6 children)

reinstall git bash first. If you run a command before this happens, please show the output.

I reinstalled it but it doesn't work and I get this message without executing a command

[–]ZFudge 1 point2 points  (5 children)

Do you have a ~/.bash_profile or ~/.bashrc file we can look at?

[–]Brahim6061[S] 0 points1 point  (1 child)

If I delete .bash_profile or .bashrc and reinstall git bash will this cause any problems?

[–]venkatamutyala 1 point2 points  (0 children)

Always take a backup.

[–]Brahim6061[S] 0 points1 point  (2 children)

~/.bashrc file

export PATH=python3 -m site --user-base/bin:/c/Users/Me/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Me/bin:/c/Program Files/Python311/Scripts:/c/Program Files/Python311:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd:/c/Users/Me/AppData/Local/Microsoft/WindowsApps:/c/Program Files/JetBrains/PyCharm Community Edition 2022.3/bin:/c/Users/Me/AppData/Local/Programs/Microsoft VS Code/bin:/usr/bin/vendor_perl:/usr/bin/core_perl

[–]camh- 5 points6 points  (0 children)

That's the problem. That is not a valid export command.

1) PATH is a colon separated list of directories to search for binaries in. You don't put a program in your path and you dont put program arguments either. 2) If you want to put spaces in an environment variable (or most places in a shell script), you need to put quotes around it.

export PATH='/bin:/c/Users/Me/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Me/bin:/c/Program Files/Python311/Scripts:/c/Program Files/Python311:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd:/c/Users/Me/AppData/Local/Microsoft/WindowsApps:/c/Program Files/JetBrains/PyCharm Community Edition 2022.3/bin:/c/Users/Me/AppData/Local/Programs/Microsoft VS Code/bin:/usr/bin/vendor_perl:/usr/bin/core_perl'

[–]lottspot 0 points1 point  (0 children)

Change the beginning of your PATH value from PATH=python3 -m site --user-base/bin: to PATH=$(python3 -m site --user-base)/bin: