问题
This problem is not related to any git configuration nor repository, it's related with the Program Gith Bash and the OS Windows 10
It began once I installed and customized Git Bash on my Windows profile, it never appeared the Git icon on the toolbar, which was bothering me. So I start to go after some ways to fix it. (reinstalling never worked)
In an attempt to erase all customizations I made on Git Bash I deleted everything related to Git from the Windows Registry Editor, which at the time I thought would solve the problem but only made it worse.
Now I can't even start my Git Bash, it's sort of useless, and none of the modifications I made was undone.
When I install Git and try to open the Bash it shows with the visual customizations I made + the following message.
回答1:
First, try to type "bash" in a CMD where you have set up (for testing) a simplified PATH
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\Git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%MAVEN_HOME%\bin;%PATH%
Then simplify your .bashrc
in order to check what causes those error messages.
I generally tend to rely on a simple Git installation, by unzipping PortableGit-2.19.0.rc2.windows.1-64-bit.7z.exe anywhere I want.
来源:https://stackoverflow.com/questions/52285563/trouble-with-git-on-windows-10