Git-bash WIndows : /usr/bin/bash: can't find configuration file /usr/local/etc/profile.global; exiting."

Viewed 2189

I've been using GIT for Windows several months now with good success. Then suddenly when I try to open up Git Bash the way I usually do via explorer. I choose "Git Bash Here", bash shell opens up fore a split second only to display: "hostname: unknown option -- s Try 'hostname --help' for more information. /usr/bin/bash: can't find configuration file /usr/local/etc/profile.global; exiting."

I get this same error if I hop over to the Git directory and run git-bash.exe directly. However if I run the exe in administrator mode it opens fine. I changed the security permission to the executable so my username has full access but that didn't change anything.

Any ideas? Would love to get my "Git Bash here" capability back. Not sure why it stopped working? Thanks!

2 Answers

The solution at this link solved the issue in my case.

Just create an empty file at the path /usr/local/etc/profile.global

The usr folder is present in C:\ProgramFiles\Git

This should be a bug of git, create an empty file named profile.global in C:\ProgramFiles\Git\usr\local\etc\ do works.

Related