Closed yogendraapawar closed 1 month ago
Please open a PowerShell window and call & "C:\Program Files\Git\bin\bash.exe" -li
. Does this work? If not, could you copy/paste the error message that is shown?
When I run this command, below mentioned message briefly appears before the PowerShell window clears and restarts.
Usage: /usr/bin/bash [build | run]
When i try to open the bash terminal from vs-code I get this message
The terminal process "C:\Program Files\Git\bin\bash.exe" terminated with exit code: 1.
I also tried reinstalling the git bash, but it still doesn't work
Usage: /usr/bin/bash [build | run]
That seems wrong. The usage string that /usr/bin/bash
produces should be something like Usage: /usr/bin/bash [GNU long option] [option] …
.
In addition to @rimrul's concerns, what does & "C:\Program Files\Git\usr\bin\bash.exe" -li
show (note the added usr\
)?
hi @dscho and @rimrul
https://github.com/git-for-windows/git/assets/87609565/83d2d6df-b4e0-4e54-bf85-174575065a46
In the above video you can see that I am running & "C:\Program Files\Git\usr\bin\bash.exe" -li
this command, a message
Usage: /usr/bin/bash [build | run]
appears for a while and instantly disappears.
Wow, that's definitely very, very wrong.
In my v2.45.0 installation, the SHA-256 of C:\Program Files\Git\usr\bin\bash.exe
is:
PS C:\Users\me> Get-FileHash "C:\Program Files\Git\usr\bin\bash.exe"
Algorithm Hash Path
--------- ---- ----
SHA256 19AF3E33574FF81B86DA0679E3E81E7051AB2ECE082EE10C1887F7AAF9E06BB0 C:\Program Files\Git\usr\bin\bash.exe
What's yours?
PS C:\> Get-FileHash "C:\Program Files\Git\usr\bin\bash.exe"
Algorithm Hash Path
--------- ---- ----
SHA256 19AF3E33574FF81B86DA0679E3E81E7051AB2ECE082EE10C1887F7AAF9E06BB0 C:\Program Files\Git\usr\bin\bash.exe
same as yours
@yogendra131994 maybe you can monitor using ProcMon which executable gets called?
Logfile.CSV Here's the csv I exported after running git-bash after applying the filter to monitor git-bash.exe
@yogendra131994 maybe you can have a go at analyzing this yourself first? I am stretched too thin right now and cannot assist.
@dscho yes I'm also working on it
I tried searching about the issue and found this conversation on reddit, I tried this and my problem was resolved
I had .bashrc
script in my User Profile "C:\Users\YogendraPawar"
directory, I simply deleted it and was able to launch git-bash.exe.
Thank you @dscho and @rimrul for sharing your insights and helping me with the issue! I am closing this issue.
Setup
Details
Git is totally accessible from any terminal/ shell but I have an issue launching git bash from shortcut, as well as from anywhere else
** I am trying to open git bash from here,
On launching bash I see this window and it closes instantly, within a second I tried running it as admin, it still didn't work Below is the screenshot of the opened window
**
I can provide the commit id b5d0511969ccd9ab86395c37e5a7619d8b4e7c32 here it is